tus / TUSKit

The tus client for iOS.
https://tus.io/
MIT License
214 stars 115 forks source link

support server current protocol extensions information request #154

Closed MartinLau7 closed 1 year ago

MartinLau7 commented 1 year ago

Add feature to fetch information about server support. Fixes https://github.com/tus/TUSKit/issues/153.

MartinLau7 commented 1 year ago

pr for #153

MartinLau7 commented 1 year ago

But wouldn't we be able to read the supported extensions on metadata since that's also being passed? I'm wondering why you'd want to pass both when metadata already holds the information you need

Again, I am currently unable to get these extensions passed correctly, if you have a better suggestion I will change this section

donnywals commented 1 year ago

What's the issue with reading the metadata's supported extensions inside of the method vs. passing them as a separate argument? To me that looks like there wouldn't be any issues with that since it's reading the same property from the same object, just without the extra function argument

MartinLau7 commented 1 year ago

@donnywals Maybe I could provide a separate function to get extension information, and let the developer decide. supportedExtensions: [TUSProtocolExtension] doesn't destroy the original code results. What do you think?

donnywals commented 1 year ago

That sounds like a good option that wouldn't break our public API 👍🏼

MartinLau7 commented 1 year ago

Sorry for the long delay due to personal work. I have submitted a new PR #160 to handle this discussion, so I will close this PR.