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 version of Parse Server.
Issue Description
We are using Digital Ocean Spaces for storing files. It is S3 compatible storage, so that we are using parse-server-s3-adapter
. However, DO Spaces don't support all S3 features - one of unsupported are tags. In current version of parse-server-s3-adapter
every upload fails. The problem is, that ParseFile contains tags
object even when no tags are set.
Firstly, I proposed change in parse-server-s3-adapter
adapter itself (see pull request parse-community/parse-server-s3-adapter#135), but after some discussion was raised question, if this should not be handled in ParseFile itself. I looked to code and by default ParseFile sets both metadata and tags to empty objects. In this case, s3 files adapter send those options to S3 as empty tags list.
Is there any reason why both tags
and metadata
are always empty objects and not undefined when not set? Maybe this is architectural decision, but files adapters handles case, when tags and metadata are undefined and in that case, they correctly don't set them.
Steps to reproduce
- configure Parse server with Digital ocean spaces as file storage
- try to upload - it fails
- try to remove code, that sets metadata in Parse File S3 adapter
- upload works
Actual Outcome
Current verson of Parse server don't work with Digital Ocean spaces
Expected Outcome
It should work with Digital Ocean Spaces
Server
- Parse Server version:
4.5.0
- Operating system:
docker nodejs
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Digital Ocean
Database
- System (MongoDB or Postgres):
Postgres
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
CloudCode