Giter VIP home page Giter VIP logo

Comments (6)

seanadkinson avatar seanadkinson commented on July 17, 2024

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.

njj avatar njj commented on July 17, 2024

@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.

njj avatar njj commented on July 17, 2024

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.

seanadkinson avatar seanadkinson commented on July 17, 2024

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.

seanadkinson avatar seanadkinson commented on July 17, 2024

Ah, just saw #14, thanks!

from react-s3-uploader.

seanadkinson avatar seanadkinson commented on July 17, 2024

@njj Pushed v1.1.12. Thanks!

from react-s3-uploader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.