You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2022. It is now read-only.
This seems really shotgunny — in that it seems like you’d accidentally send a bunch of useless stuff (since you’re copying every key over from the arguments). Is there an approach that’s more targeted?
After some trials and errors, it seems the best way is to set the filename with extension and set with attachment. Even though explicitly setting the name and mimeType, Trello won't help me generating an image preview, if my filename is like upload_3456789 instead of image.png with the correct extension.
My situation is, when I did a form upload to my node server with koa-body module, it will generate a filename with random string. If I applied this commit and send the request with,
I can set the display name to abc.png. But it won't, 1. generate an image preview and 2. when downloading the file, it's not abc.png but the random string generated by the module.
My best workaround is renaming the temporary file to abc.png.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this commit, the filename can't be set to name other than the original file name.
But still, there is some issue setting the mimeType.