parse-community / parse-community/parse-server-s3-adapter

S3 filename generated by ``generateKey`` option is ignored by Parse Server

Open
#87 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
80
Forks
86
PR merge metrics
No merged PRs in 30d

Description

If you use the generateKey to customize a filename before uploading a file to S3, the newly generated filename is then ignored and not properly propagated back to the Parse Server to be stored in the fields referencing that file.

The only way to make the generateKey option work is to turn on ParseServer preserveFilenames option that will leave all the logic of generating proper file names on the client.

See https://github.com/parse-community/parse-server/issues/6518

The proposal would be to modify validateFilename in file adapters to not return error but rather a modified filename. That can in turn reuse the generateKey option.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing validateFilename and the generateKey option through the S3 file adapter and Parse Server file-reference flow. Confirm where the generated filename is changed and where the stored file field is populated. Done means a generated S3 filename is propagated back and stored correctly without requiring preserveFilenames; add or run coverage for this scenario if the repository provides it.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.