tus / tus.io Goto Github PK
View Code? Open in Web Editor NEWThe tus.io website
Home Page: https://tus.io
License: Other
The tus.io website
Home Page: https://tus.io
License: Other
jxXHR.getResponseHeader('Location')
returns null. Needs debugging/
atom/rss feed, disqus comments, etc.
Not sure how yet, but I feel a page like http://127.0.0.1:4000/blog/2015/09/19/project-status/ looks a bit unbalanced and is pretty hard to digest:
Any ideas are welcome
Also, it takes really long for the upload to start (maybe 6-8 seconds), I was checking the network activity, but for some reason couldn't find what was taking so much time.
I think it would be cool to add a "Used by" section to the homepage with companies listed in this ticket. So please leave a comment here if you (plan to) use tus in production.
The tus.io website does not contain a lot of useful information for first-time visitors to get a good idea what the entire tus project is about. The only proper resources are the short introduction texts on the landing page and the list of implementation. Of course, there is also the specification but I would not consider it a document which is supposed to teach you what the tus protocol is, if you have no idea what this is all about. However, that is no shame since this is not its purpose. Therefore I propose a list of changes which are directed towards helping newcomers become members of the tus community:
I would be very pleased to hear feedback about these points from anyone or if someone has another idea on how we can improve the website.
I have a couple questions regarding the concept of uploads finishing in the spec (https://tus.io/protocols/resumable-upload.html).
The Expiration
and Termination
extensions talk about "finished" and "unfinished" uploads, but it is neither defined what that means nor stated that these terms are explicitly undefined and it is communicated out-of-band whether an upload is finished. The only cases where a concept of "finished" is easily available are:
Concatenation
extension, where one could easily argue that the "final" upload makes that upload "finished".Creation
extension is used and either Upload-Length
was set at the beginning, or Upload-Defer-Length
was used and with a subsequent
Once it is known the Client MUST set the
Upload-Length
header in the nextPATCH
request.
the length was learned, and that offset eventually reached.
But these are extensions; likely other independent extensions shouldn't depend on them for semantics.
The Core protocol has only 1 ocurrence of the Upload-Length
header, namely in the response to the HEAD
request:
If the size of the upload is known, the Server MUST include the
Upload-Length
header in the response.
Thus, it would be great to have the following clarifications stated somewhere explicit in the FAQ:
The Core protocol does not define a notion of when an upload is finished. At any given time it is unknown whether more data will be added to an Upload.
In the Creation
extension, regarding
Once it is known the Client MUST set the
Upload-Length
header in the nextPATCH
request.
there is the case that a client sent a previous PATCH
request, and then later learns that there is no more data. In this case, I suppose the client would send a PATCH
request with an empty body and sets the Upload-Length
header for it (this is what e.g. the tus.py
client does, see cenkalti/tus.py#8).
If this is how it's supposed to work, might be nice to state that in the FAQ, because implementing a server I wasn't at first sure what to do with empty PATCH
requests.
I believe the following is a bit unclear in the spec:
Concatenation
extension:
The
Upload-Length
header MUST be included if the length of the final resource can be calculated at the time of the request.
POST
requests that set Upload-Concat: partial
? Or also the PATCH
request, that transmit the data (similar to "set the Upload-Length
header in the next PATCH
request" from the Creation
extension)? If the latter, it's confusing that this wording doesn't use "in the next PATCH
request; the current wording implies that if if the client knows the length all the way from the beginning to the end, the Upload-Length
header MUST be included in each of the request (but the subsequent "Example" doesn't show that happening).Creation
extension.Thanks for considering / answering those points!
This is really nice up-write of why and how TUS http://tus.io/blog/2015/11/16/tus.1.0/
just one question is open: could TUS also handle the change of an IP address?
e.g.
you start an upload at home in your own wifi and take your notebook with you to work where is another wifi => could the upload in new wifi with new IP address be resumed?
you start an upload with your mobile 3G connection not having noticed that you are not in wifi when noticing it you switch to wifi
=>
if this could be handle: it would be perfect to have this documented on website
if not - we should strongly think about it!
I can't start or resume a file I am uploading. I've tested this on three machines, two linux, one windows, multiple browsers each.
See @hintjens's comment here: #14 (comment)
We should at least target the latest versions of Chrome, FF, Safari and IE at first.
Right now you have to edit the js/main.js
file to change the url endpoint used for the demo. This config should be moved to _site.yml and be easy to overwrite for local development.
Problems:
.js
files are not interpreted as templates by jekyll, so {{ site.demo.url }}
isn't accessibleThis is not urgent, but a nice to have.
I see we're using node dependencies to build less->css.
Would it make sense to use Jekyll's built in stuff for this?
I'm not sure if the less
node module is faster or anything. But it would be nice to just do jekyll serve --watch
, and not only have previews of html changes but also layout.
I realize one could now run npm scripts build:watch
, but having a unified toolchain would be nice?
Can the public access master.tus.io/files to test? the CORS policy blocks this at present. See my component:
https://beam-australia.github.io/material-tus/?path=/story/upload--events
Here's a screen with some suggestions:
About the platforms... Could we use the ones mentioned here for starters? https://travis-ci.org/tus/tus-js-client/builds/68939798
moved to tus-android-client
this way we can tell what files were uploaded, how fast, etc.
Here's the notification:
Infected web resource detected
one minute ago
Feature:
Online Threat Prevention
We blocked this dangerous page for your protection:
https://tus.io/
Accessed by: brave.exe
Dangerous pages attempt to install software that can harm the device, gather personal information or operate without your consent.
just fyi, not sure where or why you're blacklisted?
Hi,
I've recently talked with a friend and realized that for majority of the audience, the project is dead, since there's no activity on the www.tus.io page.
Maybe it is time for a blog post mentioning changes coming in 1.0, and expected release date?
What do you thiink?
this way we can set it for the download url
Hello,
I'm not sure if it is worth including under example projects, but I have a crude use of tus that might be easy for beginners to understand. It is at https://github.com/TheJacksonLaboratory/image_upload_service and if it is good enough, feel free to include it.
Please remove Client/eahydra/tusclient(https://github.com/eahydra/tusclient)
I don't maintain the code.
Hello,
I have written a new Python client for Tus protocol.
https://github.com/cenkalti/tus.py
Not every extension is supported but it is working okay for months so it is mature enough. We are using it at https://put.io internally. Also it is a dependency for our client library putio.py. A review from you guys would be good though.
Would you like to list it on https://tus.io/implementations.html page?
I can send a PR if you want.
This was fixed in your protocol (tus/tus-resumable-upload-protocol#23) but has not propagated to the website yet.
Move stuff from tusd readme into docs section.
Hi
There is one problem I am having while making a pascal client for tus.
I can successfully issue a POST to create a resource. It returns the resource location URL, which I checked and it returns a header "Upload-Offset:0". This is expected, because no data has been uploaded yet.
After that I send a PATCH and it starts uploading. If I interrupt the connection before it is finished, the HEAD call for the resource still returns "Upload-Offset:0", so no data has been saved and the upload can't be resumed. If I understand the protocol correctly, the offset should indicate the number of bytes that were transferred before the interruption.
If the connection is not interrupted, the upload finished properly and the Upload-Offset indicates the size of the upload.
I made several tests: with my client and with the Postman app, on the https://master.tus.io server and on a server running the official node.js implementation. All the results were the same.
The only conclusion that comes to mind is that I am not using chunked transfer mode. Is that a requirement for resuming?
Here is the Postman PATCH request, for reference
PATCH /uploads/e8395bfb60b88618e50b1948eed5149e HTTP/1.1
Host: XYZ
Tus-Resumable: 1.0.0
Content-Type: application/offset+octet-stream
Upload-Offset: 0
Content-Length: 10000000
Cache-Control: no-cache
The tus protocol is built upon the principles of simple pausing and resuming. In order to pause an upload you are allowed to end the current open request. The Server will store the uploaded data as long as no violations against other constraints (e.g. checksums) or internal errors occur.
There are no checksums sent and I don't think a simple disconnect would cause internal server errors.
Thanks for any advice on the topic.
I made a client implementation for .net (C#,Visual Basic.Net,etc)
https://github.com/gerdus/tus-dotnet-client
Protocol version v1.0.0
MIT License
Please add it to the implementations page.
When the browser has a width of about 946px, the menu icon is hidden behind the GitHub icon on the upper right corner and the navigation is not accessible. When the browser is wider the full navigation items get shown correctly. Also, when the browser width is smaller, the GitHub icon gets hidden correctly. So this seems like an inconsistency in the limits for media queries in CSS.
Hi, I just found a little miss in this file: https://github.com/tus/tus.io/blob/b2dc1ed67562f459281acfc06dda33167cc1ac0d/_pages/faq.md#how-are-pauseresume-handled-when-should-i-delete-partial-uploads
There is a ata
, but I think this must say data
.
Your project looks really nice.
I tried the online demo, but nothing happened (on Chromium and on Firefox - on arch linux).
Looking at the Chromium console, I found this:
upload-demo.js?c221:15
Uncaught ReferenceError: tus is not defined
at HTMLDocument.eval (eval at <anonymous> (https://tus.io/assets/build/app.js:162:2), <anonymous>:15:8)
at fire (eval at <anonymous> (https://tus.io/assets/build/app.js:66:2), <anonymous>:3182:31)
at Object.fireWith [as resolveWith] (eval at <anonymous> (https://tus.io/assets/build/app.js:66:2), <anonymous>:3312:7)
at Function.ready (eval at <anonymous> (https://tus.io/assets/build/app.js:66:2), <anonymous>:3531:13)
at HTMLDocument.completed (eval at <anonymous> (https://tus.io/assets/build/app.js:66:2), <anonymous>:3547:9)
Any idea what is happening?
2109380 was needed to make the demo work with jquery 1.9.1, but breaks the demo for Firefox again. This needs to be fixed.
If you save files without extension, so how web server ( ex: IIS) can serve static file (image)? (for best performance on display?)
Any config to add extension to file?
We should move tus.io off of Lanyon/Jekyll (unmaintained, hard to install dependencies) and onto Eleventy (just plain js, similar features, maintained). Instead of porting all the Liquid and modules and from the bottom->up (it's very similar, but from experience, addressing the subtle differences will keep us busy for a very long time, and the end result will be less idiomatic for 11ty), we should start with a clean slate: https://slinkity.dev/, and then just copy paste some markdown over, some styles, one or two build scripts to inject the community & protocol itself. Diff both of the _site
dirs to rule out 404s (create redirs for all).
Is there a python client?
I've been looking into tus lately. The demo page was working a few days ago, but isn't at the moment. I get this error:
Relevant lines from the chrome dev console:
XMLHttpRequest cannot load http://master.tus.io/files/. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://tus.io' is therefore not allowed access.
XHR failed loading: POST "http://master.tus.io/files/".
chrome network log shows an OPTIONS request, but it seems to be missing the CORS + tus headers.
As an aside: does tus-js-client provide a way to know in which 'phase' an error has occurred? I might like to tell a user one thing if an error has happened while uploading, and a different thing if the upload could not be started at all.
Please see the full output here
$ make build-assets
--> Building assets..
> [email protected] build /Users/kvz/code/tus.io
> run-scripts css js
util.print: Use console.log instead
> [email protected] css /Users/kvz/code/tus.io
> run-scripts css:less css:prefix css:minify
> [email protected] css:less /Users/kvz/code/tus.io
> lessc _assets/app.less > assets/build/app.css
> [email protected] css:prefix /Users/kvz/code/tus.io
> autoprefixer assets/build/app.css
> [email protected] css:minify /Users/kvz/code/tus.io
> cleancss -o ./assets/build/app.css ./assets/build/app.css
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
> [email protected] js /Users/kvz/code/tus.io
> run-scripts js:hint js:concat js:minify
> [email protected] js:hint /Users/kvz/code/tus.io
> jshint $(find ./_assets/js -name "*.js")
> [email protected] js:concat /Users/kvz/code/tus.io
> concat-from-list _assets/app.cson assets/build/app.js
/Users/kvz/code/tus.io/node_modules/concat-from-list/index.js:65
files.forEach(function (file) {
^
TypeError: undefined is not a function
at [object Object].run (/Users/kvz/code/tus.io/node_modules/concat-from-list/index.js:65:9)
at Object.<anonymous> (/Users/kvz/code/tus.io/node_modules/concat-from-list/bin/concat-from-list:19:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "js:concat"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] js:concat: `concat-from-list _assets/app.cson assets/build/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] js:concat script 'concat-from-list _assets/app.cson assets/build/app.js'.
npm ERR! This is most likely a problem with the tus-io package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concat-from-list _assets/app.cson assets/build/app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls tus-io
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/kvz/code/tus.io/npm-debug.log
exec error: Error: Command failed: /bin/sh -c npm run js:concat
/Users/kvz/code/tus.io/node_modules/concat-from-list/index.js:65
files.forEach(function (file) {
^
TypeError: undefined is not a function
at [object Object].run (/Users/kvz/code/tus.io/node_modules/concat-from-list/index.js:65:9)
at Object.<anonymous> (/Users/kvz/code/tus.io/node_modules/concat-from-list/bin/concat-from-list:19:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "js:concat"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] js:concat: `concat-from-list _assets/app.cson assets/build/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] js:concat script 'concat-from-list _assets/app.cson assets/build/app.js'.
npm ERR! This is most likely a problem with the tus-io package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concat-from-list _assets/app.cson assets/build/app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls tus-io
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/kvz/code/tus.io/npm-debug.log
> [email protected] js:minify /Users/kvz/code/tus.io
> uglifyjs assets/build/app.js -o assets/build/app.js
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
util.print: Use console.log instead
Just for me or for everyone? I'm using
$ node -v
v0.12.4
on OSX.
/cc @fahad19
Since the demo should not only present the functional and interactive aspects of tus but also the technical ones, I would favour if a log section would be added where every tus-specific request and the appropriate response are shown in chronological order. In addition, further details such as explanations for headers can be implemented.
/cc @kvz
Is there any command line client to upload a file to a tus server? Would be useful for testing implementations.
seems to only update after a chunk has been uploaded
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.