Comments (6)
With fix from #11, can you see if this still is broken?
We should change the path from /s3/img
to /s3/files
or /s3/uploads
to account for this not being specific to images.
from react-s3-uploader.
@seanadkinson still doesn't seem to be working for me when I try to upload an audio file. The onError
fires with a 403
from react-s3-uploader.
Okay, I think I figured out whats going on. It appears that the mimeType
on the Node side doesn't match up with the file.type
on the front end. This is causing things to 403. i.e. foo.wav mimeType in node is audio/x-wav
, while on the front end the file type is audio/wav
A suggested fix could be something like:
xhr.open('GET', this.signingUrl + '?objectName=' + fileName + '&contentType=' + file.type, true);
And then on the node side:
ContentType: req.query.contentType
@seanadkinson thoughts?
from react-s3-uploader.
Ah, that makes sense. Interesting that the browser and node have different mime types for the same extension, but since the browser is the one uploading the file, I suppose he should be in charge of the mime type.
Did you want to put together some changes on a branch and submit a PR? I may not get to this until later this week.
from react-s3-uploader.
Ah, just saw #14, thanks!
from react-s3-uploader.
@njj Pushed v1.1.12
. Thanks!
from react-s3-uploader.
Related Issues (20)
- MultipartUpload support? HOT 1
- Method Not Allowed 405 PUT Error
- index.d.ts missing methods/props HOT 1
- ReactS3Uploader.propTypes is undefined when deployed on Heroku HOT 3
- Domentation for all the props
- iPhone camera video quality issue
- Console Warning: getDefaultProps is only used on classic React.createClass...
- Content-Type is blank when uploading HOT 3
- How to notify server of image upload? HOT 1
- Is the "accept" prop even being used? Where can we find a list of valid prop arguments? (Duplication of #220) HOT 2
- Return boolean or Promise on file upload
- Can't limit upload size HOT 1
- Getting CORS error on uploading file on AWS S3 HOT 3
- Unable to generate a valid signed upload URL for Digital Ocean spaces
- Type for signingUrlHeaders is wrong HOT 2
- findDOMNode is deprecated in StrictMode HOT 1
- Uncaught ReferenceError: process is not defined - Chrome browser Console error HOT 2
- Upload error 400 after onProgress reports all the way through 100% HOT 4
- Mime-types modules is not intended to be used with browser HOT 2
- Upload error: Could not contact request signing server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-s3-uploader.