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

Remove extraneous leading forward slash on uploaded files #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahlec
Copy link

@ahlec ahlec commented Nov 30, 2020

There's a separate PR here (#8) which does the same thing, but looks to be based off an older version of the repo.

I found when I was using this locally that if I wanted to upload files to the root of the S3 bucket, I wasn't able to -- it would always upload it to a directory that existed in the root, named /. So the file foo.txt that I wanted in the root was being uploaded inside of directory /.

This seems to be the case when you have an empty uploadPath. The filepath (pre-upload path) still has the leading / from lopping off the base, which is useful for joining the uploadPath to it and producing a valid directory structure. But when there is no uploadPath, it still keeps the separator, which throws off the process.

@adrianfalleiro
Copy link
Owner

Thanks I'll take a look.

@pascencio
Copy link

@adrianfalleiro I have same problem here. Thanks in the advance!

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 this pull request may close these issues.

None yet

3 participants