TUSKit
TUSKit copied to clipboard
Metadata field regression
This PR makes this implementation behave different from tus-js-client
(at least) with regards to how custom metadata is packaged.
Currently, there's no straight-forward way to add a custom entry to the Upload-Metadata
header directly.
Hi @andrestone,
Could you elaborate on what you mean with the lack of a straight-forward way to add a custom entry? All the public upload methods in the client accept custom headers, which should be sufficient for most use cases.
The custom headers are not added as fields on the Upload-Metadata HTTP header. It seems like, after that PR, the custom headers are added as a separate dictionary.
This behavior is not consistent with the JS client implementation.
Thanks for the clarification. Looking at the docs of the tus-js-client
is see this about headers:
An object with custom header values used in all requests. Useful for adding authentication details, for example:
headers: {
"Authorization": "Bearer ..."
}
That is also how it's currently used in this library. Perhaps I'm missing something, could you point out where the difference is?
It's about being able to add to a specific header (Upload-Metadata). https://github.com/tus/tus-js-client/blob/master/docs/api.md#metadata
Ahh I see. You are right, will fix this and follow up soon.
Sounds like the issue is fixed here but still waiting on a package release with it https://github.com/tus/TUSKit/pull/143
We hope to release a new version in the next two weeks with this fix included.
It took a little bit longer than we’d have liked but we currently have a release out. You can update to 3.1.5 to pull in the fixes mentioned here 👍🏼