Skip to content
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

Merged
merged 1 commit into from
May 22, 2018

Conversation

vith
Copy link
Contributor

@vith vith commented May 21, 2018

closes #753

I'm assuming it's OK to just drop the original type field.

@arturi
Copy link
Contributor

arturi commented May 22, 2018

Thanks!

I'm assuming it's OK to just drop the original type field.

Why not add? I think it might be safer, in case some people are already relying on type on tusd side.

meta.filetype = meta.type
delete meta.type
}
optsTus.metadata = meta

Copy link
Contributor

@arturi arturi May 22, 2018

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

@vith vith force-pushed the tus-metadata-filetype branch from 337d939 to 3207893 Compare May 22, 2018 14:42
@vith
Copy link
Contributor Author

vith commented May 22, 2018

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.

@arturi
Copy link
Contributor

arturi commented May 22, 2018

Thank you! 👍

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.

"strange" file name and typ when re-downloading
2 participants