Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify path of upload #51

Open
tmf-chris opened this issue Jan 20, 2018 · 3 comments
Open

How to specify path of upload #51

tmf-chris opened this issue Jan 20, 2018 · 3 comments

Comments

@tmf-chris
Copy link

tmf-chris commented Jan 20, 2018

I am trying to get the file uploaded into a path such as this:

/folder1/folder2/filename.jpg

I am passing in an s3Url such as this:

const s3Url = 'https://s3.us-west-1.amazonaws.com/mybucket/'; const path = 'folder1/folder2'; ... <DropzoneS3Uploader onFinish={this.handleFinishedUpload} s3Url={s3Url} maxSize={1024 * 1024 * 5} upload={{s3path: path}} />

What this is doing is adding the file but it is adding the unique id stuff (that s3 prepends to the url) to the first folder:

/iweufhwe_folder1/folder2/filename.jpg

Whereas I would like it to be:

/folder1/folder2/iweufhwe_filename.jpg

@tmf-chris
Copy link
Author

Looks like the version of react-s3-uploader being used for this project is a bit old. A recent fix:

odysseyscience/react-s3-uploader@542f152

Seems to suggest they fixed an issue when you supply your own path. Could we get an update that brings in the latest version of react-s3-uploader?

@fernandobandeira
Copy link

fernandobandeira commented Apr 20, 2018

I've had this issue, upgrading the react-s3-uploader to use version 4.8.0 fixed it for me.

For those of you that need a fix urgently, you can use the repo which I;ve upgraded the version, add this to your package.json:

"react-dropzone-s3-uploader": "git+https://git@github.com:fernandobandeira/react-dropzone-s3-uploader.git",

Also, consider forking the repo to yourselves and change it back to this repo once the maintainer fixes the issue.

@aysark
Copy link

aysark commented May 30, 2018

Yeah this package seems to be no longer maintained...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants