Giter Site home page Giter Site logo

klowner / tussle Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 2.0 4.32 MB

Tus daemon written in Typescript using a pluggable architecture

License: MIT License

JavaScript 2.61% TypeScript 97.39%
tus-protocol tusd cloudflare-workers nodejs backblaze-b2 file-uploads tus hacktoberfest file-upload middleware

tussle's Introduction

Tussle

Tussle is a mostly spec-compliant server implementation of the tus upload protocol.

CircleCI Coverage Status

Component based

Tussle is implemented as a collection of interchangeable modular components, allowing the developer to choose which services that they'd like to integrate with. At the center of a Tussle instance is the Tussle Core, which handles all communication between individual components.

Components

Middleware

Middleware components handle communication between clients and the Tussle instance.

State

Tracking state is tricky and often your options are limited by your deployment environment. Tussle state components are modeled after the Web Storage API

Storage

Uploaded files have to be stored somewhere, that's the purpose of the storage components.

  • storage-b2 - Backblaze B2 cloud storage (supports large file upload)
  • storage-s3 - AWS S3 compatible cloud storage (supports large file upload)
  • storage-r2 - Cloudflare R2 cloud storage (supports large file upload, ^0.4.0 adds parallel support)

Request

The request component a responsible for creating outbound HTTP requests and -- when possible/appropriate -- transparently proxy upload payloads, which is determined by the storage component.

Support me

If you find this library useful, please consider buying me a coffee as a way of showing your support! "Buy Me A Coffee"

tussle's People

Contributors

klowner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

amery spencerbart

tussle's Issues

cloudflare s3 example maybe broken

I tried to play with the CF S3 example (using iDrive E2 storage as an S3 endpoint) and always end-up with the objects named 'files' in the root of the bucket. I am not sure what config is required beyond all of the access/secret/endpoint/etc things. For now I gave up since I did not want to spend digging through the layers of code to see where the problem is. If you have a complete working example that I could learn from, that would be great. Thanks.

Store write failures should result in 500 or 503 response

Right now the create handler returns a 400: Bad Request if there's a write failure by the storage service.
Clients should not re-attempt requests that produce a 400, but in our case, the client should retry.

Consider responding to the client with a 500: Internal Server Error or 503: Service Unavailable.

(tus-js-client does not attempt to retry in the case of a 4xx response)

Handle PATCH offset mismatch with 409 Conflict

It seems this isn't handled currently. It would be nice to have this performed in core, but delegating the responsibility to the storage service and maybe formalizing the potential error responses is a better route.

Help write unit tests

Want to help increase Tussle's test coverage?

Integration and unit tests need to be written for a few components. As of writing, there are integration tests available for state components (see packages/spec/src/stateTests.ts), but storageTests.ts and requestTests.ts are pretty much empty.

Feel free to add anything that increases test coverage.

๐Ÿฅณ

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.