Comments (5)
Even if downloading content is not the scope of the tus protocol, I do see the reasons for why the tusd should server should support range requests. Luckily, Golang includes a convenient function for serving content over HTTP (https://golang.org/pkg/net/http/#ServeContent) which also respects the Range header.
Unfortunately, due to it's argument types, this method may only be useful if you are using a disk-based storage (the stream needs to support seeking which is only efficient for disk-based storages in our case). Considering this limitation, would you still benefit from this feature addition?
from tusd.
I don't understand what you mean of "Disk-based storage", what other options for file storage do you have in mind?
from tusd.
I agree that my description was not accurate enough. What I meant was local disk-based storage where the tus server writes the uploads directly to a local disk (in theory, it could also be a mounted network file system; the server just needs to be able to access the files using standard file system methods). The opposite of this would be storing the uploads on a remote server, e.g. AWS S3 or any other cloud provider. The difference is that in latter case you do not have direct access to the files but instead needs to use their provided API.
from tusd.
Yes I understand, we intend to use our own storage for file saving, if you suggest to use another http server, say Apache, how do we know the remote file URL in clients? would it be sufficient to just convert the resolved url (the url that tus gives when starting to upload a file) to something that our http server understands?
from tusd.
If you want to run a proxy in front of a tusd server, be sure to add the -behind-proxy
flag to the command line (or use RespectForwardedHeaders
in https://godoc.org/github.com/tus/tusd#Config if you use the package directly). When enabled and assuming your proxy sends the X-Forwarded-* or Forwarded headers, the URL returned after creating an upload will automatically use the host, port and protocol from the proxy. In most cases, this should be enough to run tusd behind Apache, Nginx etc. You don't have to do any URL conversion manually.
from tusd.
Related Issues (20)
- docs: Add example usage with Minio and Azurite
- Many post-receive hooks after post-finish hook HOT 3
- Unable to fetch Upload Id from Path HOT 1
- cli: Option log-format=json is ignored for plugin logs HOT 1
- using tusd handler with gorilla mux causing "NetworkControlError" warnings HOT 10
- Given nginx configuration slows down uploads over https HOT 1
- NetworkControlError/NetworkTimeoutError "feature not supported" in logs HOT 1
- Mismatched offset caused by duplicate part name with old file use s3store.
- Unclear if filelocker has to be used with filestore HOT 7
- Improve the lock interface to better suit distributed locks
- Forward headers to grpc hook java HOT 2
- -upload-dir flag HOT 7
- 'latest' docker image seems not to be the latest HOT 2
- [Question] Authentication for HEAD / PATCH HOT 2
- Make use of locker mandatory HOT 5
- How to clean up partial upload chunks after final upload success? HOT 2
- Does the specification allow, disallow, or does not specify to upload empty (content-lenght 0) files? HOT 3
- Am I doing the gcp bucket set up right? keeps failing with EOF error HOT 11
- pre-finish blocking script problem HOT 1
- validating video files using blocking hooks HOT 4
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 tusd.