Giter Site home page Giter Site logo

Comments (4)

Acconut avatar Acconut commented on June 12, 2024

Note: I transferred this issue to the repo covering tus v1, as this issue seems to be talking about this version. The tus-v2 repo was not the correct repo because tus v2 works a bit different.

from tus-resumable-upload-protocol.

Acconut avatar Acconut commented on June 12, 2024

Thank you for these insights! They are always helpful with discovering the actual issues that arise when deploying tus services.

File uploads are detected if the request is a multipart/form-data with a part that has a filename attribute.

tus never uses the multipart format and, as such, this requirement will never be met. We have decided not to use multipart because for our use cases it does not provide any benefits and would only cause additional complexity.

TUS uploads files using the application/offset+octet-stream, which is not part of the default OWASP ruleset for allowed content types.

Ok, that seems overly restrictive. But again, the content type is now an integral part of the tus protocol.

I accept that changing the TUS protocol so it doesn't fall afoul of these detections is going to be near impossible at this stage, however I wanted to shine a light on the issues so they are at least known about and can be taken into consideration in the future.

Again, thank you for these insights! AFAICT, you are able to work around these issues. tus v2 will not have a pre-defined content type, and therefore the second issues should not be present. However, tus v2 will also not use multipart, so the first issues still needs a workaround.

I hope that helps!

from tus-resumable-upload-protocol.

marlon-tucker avatar marlon-tucker commented on June 12, 2024

yeah I expected that would be the response, but it's good to know the content type is not fixed for the v2 protocol.

I'm going to close this issue as there isn't a path to resolve the multipart form data use case. Having to restrict the chunks to 128kb is a pain but it is what it is.

from tus-resumable-upload-protocol.

Acconut avatar Acconut commented on June 12, 2024

Having to restrict the chunks to 128kb is a pain but it is what it is.

I just want to let you know that this will likely cause bad upload performance for your application. Such a small chunk size is never a good option.

from tus-resumable-upload-protocol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.