Skip to content

Fix tag in digital ocean spaces #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

KAIOAVILA
Copy link

@KAIOAVILA KAIOAVILA commented Jan 24, 2021

Fixes #137

@mtrezza
Copy link
Member

mtrezza commented Jan 24, 2021

I'm not sure we need an additional isTagging parameter for this. But before going into detail, let's first resolve the open questions in the issue.

@KAIOAVILA
Copy link
Author

KAIOAVILA commented Jan 25, 2021

@mtrezza Right, I will only try to make a condition if it is empty the tags do not send to digital ocean spaces, what do you think?

@KAIOAVILA
Copy link
Author

The problem is that digital ocean spaces don't accept tags anymore, so if they put tags in the files, it will give an error in the same way

@mtrezza
Copy link
Member

mtrezza commented Jan 25, 2021

Please see the discussion in #135.

The idea is that if tag is:

  • undefined --> send no tag parameter to S3 endpoint
  • {} --> send empty object to S3 endpoint

We want to stay true to the value the developer sets in the file upload. Do you see a change necessary in S3 adapter, in Parse Server or both for this?

@KAIOAVILA
Copy link
Author

In this case I believe that the best would be only on the s3 adapter

Because in the documentation of digital ocean spaces, there is no longer to send tags, so even if I send an empty object, it will give an error

https://developers.digitalocean.com/documentation/spaces/#object

@KAIOAVILA
Copy link
Author

I will close this PR, because as there is already another open resolving this, in the meantime I will be using my fork to solve my problem

@KAIOAVILA KAIOAVILA closed this Jan 25, 2021
@KAIOAVILA KAIOAVILA deleted the fix-kaioavila-digital-ocean-spaces branch January 25, 2021 14:59
@KAIOAVILA KAIOAVILA restored the fix-kaioavila-digital-ocean-spaces branch January 25, 2021 14:59
@mtrezza
Copy link
Member

mtrezza commented Jan 26, 2021

In this case I believe that the best would be only on the s3 adapter
Because in the documentation of digital ocean spaces, there is no longer to send tags, so even if I send an empty object, it will give an error

What I meant was that we want to give developers both options:

  • Save a file with no tags (undefined) --> the S3 adapter should not send any tag property, not even an empty object
  • Save a file with empty tag object ({}) --> the S3 adapter should send an empty tag object

Otherwise it would mean that we change the S3 adapter because a 3rd party does not emulate the AWS S3 endpoint correctly, which seems counter-intuitive, because we want to design the S3 adapter according to AWS S3, which is the authoritative provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error uploading file to digital ocean spaces
2 participants