parse-community / parse-community/parse-server

addMetadata and addTag do not work with parse-server-fs-adapter

Open
#8,220 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.