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

support for multipart upload #168

Closed
mvrhov opened this issue Jan 19, 2018 · 6 comments
Closed

support for multipart upload #168

mvrhov opened this issue Jan 19, 2018 · 6 comments

Comments

@mvrhov
Copy link

mvrhov commented Jan 19, 2018

It would be nice if the tusd would switch to normal "multipart/form-data" based upload if Tus-Resumable header is not present. Other behavior would be completely the same.. Non file fields would be converted to metadata.
This would allow a lot of people to keep the same endpoint for old and new resumable uploads.

@Acconut
Copy link
Member

Acconut commented Jan 22, 2018

I agree that this would be a nice addition, however there are still a few open questions: What should happen if the client passes more than one file in the multipart upload? Should the responses still use the tus-specific headers? Should this be only supported for POST requests or also PATCH requests?

Furthermore, I am not sure if the added complexity in code would be worth the usage some people may get out of it. To fully utilize the features tusd offers, a proper tus client should be used.

@mvrhov
Copy link
Author

mvrhov commented Jan 23, 2018

I'd say that array of file uploads is rarer and out of the box I'd not support that.
Regarding POST/PATCH. The Method override should be supported. The old way usually use POST/PUT or POST with Method override set to PUT.

To fully utilize the features tusd offers, a proper tus client should be used.

I fully agree with that however this would simplify the backend and allow one to use the same http url for old and new uploads. So clients could gradually update their code.

@kvz
Copy link
Member

kvz commented Jan 23, 2018

I fully agree with that however this would simplify the backend and allow one to use the same http url for old and new uploads. So clients could gradually update their code.

Considering it is recommended to run tusd 'behind' nginx/haproxy so you can have more advanced access controls, and e.g. ssl termination, most setups will probably already have a receiver for legacy uploads though. Would you agree, or could you describe more about a compelling usecase to illustrate otherwise?

@mvrhov
Copy link
Author

mvrhov commented Jan 24, 2018

There probably is no need to have two endpoints if you are running a web page. However when you are running api you have to think about old clients. So having only one endpoint for upload is better IMO. Otherwise if you are running RESTFUL API you have to think of new "rel" which then points to the new url.

The problem I specifically have is that nginx with upload module takes care of the multipart upload. This module is getting tiresome to patch/fix compilation problems with each new nginx version and also it doesn't work with some of the new nginx features.

@Acconut
Copy link
Member

Acconut commented Jan 24, 2018

I would also like to mention that we currently don't have the resources to work on this on our own. However, if you would like to, we are very happy to assist you.

@Acconut
Copy link
Member

Acconut commented Mar 12, 2018

Closing this issue due to inactivity. Feel free to leave a comment if you want to continue the discussion :)

@Acconut Acconut closed this as completed Mar 12, 2018
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

No branches or pull requests

3 participants