parse-community / parse-community/parse-server
addMetadata and addTag do not work with parse-server-fs-adapter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse FS Adapter.
Issue Description
addMetadata and addTag do not work in Cloud Code with Parse FS Adapter.
Steps to reproduce
I used the below code but the createdById and groupName values were not saved
Parse.Cloud.beforeSaveFile(async (req) => {
const {file, user} = req;
file.addMetadata('createdById', user.id);
file.addTag('groupName', groupName);
});
Actual Outcome
The value createdById and groupName were not saved in ParsFile. Actually in ParsFile, metadata and tags are not saved.
Expected Outcome
When file.metadata() and file.tags() are called, the values createdById and groupName should respectively be returned
Environment
Server
- Parse Server version:
5.2.7 - Operating system:
Ubuntu - Local or remote host:
etc
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
5.0.10 - Local or remote host:
etc
Logs
None
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 by reproducing the issue with Parse.Cloud.beforeSaveFile using the shown addMetadata and addTag calls, Parse Server 5.2.7, and the Parse FS Adapter. Check whether file.metadata() and file.tags() return the values after saving, then trace the adapter's file-storage handling. Done means metadata and tags persist and are returned by those methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100