Comments (5)
I implemented a custom storage backend for all this which was the easiest way IMHO.
Resumable SHA256 can be achieved by using FFI and dumping/reading the memory of the SHA256_CTX into a file to resume processing, it obviously depends on chunk order.
Thanks for your support and implementation of the server!
from tus-ruby-server.
If all individual chunks passed checksum validation, doesn't that mean the whole upload passed it too? Why is additionally validating the total checksum at the end needed?
from tus-ruby-server.
Thanks for the fast reply!
It is meant for post-processing and later reference - i.e. we keep the checksum in a journal, use it for signing the document etc in the application. It is not meant for validating the upload but rather for later usage in the application where it would be very handy to have it computed on the fly instead of having to do a full pass later on when the file is uploaded.
We did use the nginx-upload-module which provides this (but does not provide chunk based resumable upload) so I'm looking into a way to provide this as well.
from tus-ruby-server.
Aha, I understand. For the request body IO objects that are rewindable (depends on the web server and its configuration), a hook triggered after upload might work. The only thing is that I don't know how you would resume calculating the hash between requests.
Alternatively, it could be possible to override the #patch_file
method on the storage object, and update the info hash passed as the argument there after upload.
from tus-ruby-server.
Thanks for this information - is the hook "after_upload" already available?
Resume calculating the hash would work by dumping/reading the OpenSSL SHA256_CTX context but I see now that with ruby, I can not get hold of it in an easy way..
from tus-ruby-server.
Related Issues (17)
- Rack dependency version prevents usage with Rails 4 HOT 3
- Before- and after-create hooks HOT 10
- S3-compatible endpoint consistency causing 409 Upload-Offset errors HOT 2
- S3 expire_files not checking prefix? HOT 1
- Failure on big files with S3 storage HOT 3
- error 400 in local HOT 3
- dynamic storage adapters HOT 2
- How can you find the Tus server configuration? HOT 3
- Returning 404 on OPTION check for file results in upload being unable to happen HOT 3
- Aws::S3::Errors::InvalidArgument - Invalid argument. HOT 7
- Configure a CI
- Setting to update expire timestamp on PATCH requests HOT 5
- Mounting multiple Tus::Server instances with different storage adapters HOT 2
- tus server on rails HOT 1
- 412 Pre-Condition Failed returns after whole body uploaded HOT 19
- Getting tus-ruby-server to run behind a reverse proxy HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tus-ruby-server.