parse-community / parse-community/parse-server
Upload files in folder with S3 adapter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
Hello,
I know that uploading a file on a specific folder with S3 file adapter is not correctly/fully handled with Parse.Server. I've read that all files are uploaded at the same bucket level.
However, i've uploaded a file manually in a folder in a S3 bucket. Example bucket>folder>myfile.png.
I have set with Mongo manually a parse file field on my object. (MyObject.picture = "folder/myfile.png"
When i'm trying to view this file from the file controller it doesn't works correctly.
http://localhost:1337/api/files/local_app_id/folder/myfile.png -> doesn't work :
{
"error": "unauthorized"
}
http://localhost:1337/api/files/local_app_id/folder%2Fmyfile.png
It works !
Do you know how can I fix this or am i missing something ?
Thanks a lot
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the file controller and reproduce the two requests shown: the unencoded folder path and the encoded folder%2F path. Trace how each route resolves S3 object keys and authorization, then verify that an S3 file stored under folder/myfile.png can be retrieved through the intended URL form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, node.js
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100