-
-
Notifications
You must be signed in to change notification settings - Fork 87
Don't send tags during upload if none are in options #135
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
Thank you for the contribution. Can you write a test case? |
I think this is a contradiction. "The change shouldn't make any difference, but it does make a difference for DigitalOcean." The counter argument could be that the adapter is just the intermediary that passes on whatever it gets. This change strips the developer of being able to define whether they want to send nothing at all (by not setting From #134:
Even though I agree that it probably shouldn't make a difference, I am not sure that is always the case. There may be a S3 compatible API where it does make a difference. Just like file upload shouldn't fail with DigitalOcean because of tags. Wouldn't the issue be solved by not setting |
@mtrezza probably yes, but then the fix has to be done on Parse level. From the other way, support for tags is on ParseFile - so that it should not be S3 specific feature only (even that it currently is). And on ParseFile level it means no tags -> tags are {} right? Another option to fix this is to add configuration parameter to parse-server-s3-adapter (storageSupportsTags or so). |
Would it make sense to rewrite the test case where you don't set a tag (not even an empty tag object |
@mtrezza The problem is, that Parse always calls So yes, it can be fixed on Parse side as well, when there are no metadata / tags, they will not be send to files adapter in options. I didn't want to make change in Parse itself :-), but if this would better to fix it on that side, then I can look there. |
Well, pragmatically speaking, it may be easier to do the change here, but I'm not sure that it would be the "cleanest" solution. If the tags are only used to be passed on to the S3 adapter, then the change in |
@mtrezza I will ty to look on it on Parse side, I agree that it will be better to fix it there. |
Converted to draft as the fix will likely be made in Parse Server. |
Closing this as the fix has been made in Parse Server by parse-community/parse-server#7300. @sarsonj If that PR does not fix this issue, please comment and we can reopen this PR. |
Some S3 compatible storages don't support tags and upload fails, when tags are presented (even empty one). The example of this storage is Digital Ocean spaces, that we are using.
This small change sends tags only in case, when tags are presented in file options. It should be safe change, because it there should not have been difference between file uploaded with empty tags and no tags (IMHO). Also when somebody wants to use tags, he wants to use storage, that supports tags, so that it is fine, that upload fails (as fails now).