-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Tus plugin: rename metadata field: type→filetype #844
Conversation
Thanks!
Why not add? I think it might be safer, in case some people are already relying on |
src/plugins/Tus.js
Outdated
meta.filetype = meta.type | ||
delete meta.type | ||
} | ||
optsTus.metadata = meta | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like this complicates everything a bit. If we just add filetype
(maybe check if it is not already set), it would be simpler.
Also, could you please add filename
as well? See tus/tus-js-client@ebc5189 and https://github.com/tus/tusd/blob/5b376141903c1fd64480c06dde3dfe61d191e53d/unrouted_handler.go#L640-L643
337d939
to
3207893
Compare
I was renaming the property simply because I didn't want the clutter of storing the same value in duplicate. But fair enough. The patch is now copying instead, and I added the filename property. |
Thank you! 👍 |
closes #753
I'm assuming it's OK to just drop the original type field.