Code Monkey home page Code Monkey logo

tus.io's People

Contributors

acconut avatar ajvanloon avatar bhstahl avatar brantwladichuk avatar dependabot[bot] avatar elenalape avatar fahad19 avatar felixge avatar goto-bus-stop avatar greenkeeperio-bot avatar janko avatar kieranp avatar kvz avatar lucab85 avatar murderlon avatar nickrttn avatar nigoroll avatar nqst avatar ombratteng avatar s3rius avatar smatsson avatar thsdmfwns avatar tolunayakbulut avatar tralves avatar twodarek avatar vangheem avatar vayam avatar vkrol avatar xen avatar yukeshshr 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  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  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  avatar

Watchers

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

tus.io's Issues

The demo doesn't seem to work

  1. Start uploading a large file (~200MB)
  2. Leave it for some time (before it gets to half)
  3. Close the tab and reopen it
  4. Choose the same file again
  5. Upload starts from the beginning

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.

Demo does not seem to work

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?

Changing IP adress - resume possible?

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.

  1. 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?

  2. 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!

Using Jekyll for assets?

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?

Serve static file without extension?

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?

Show HTTP requests and responses on demo page

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

Clarifications on what it means for an upload to be "finished"

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:

    • In the Concatenation extension, where one could easily argue that the "final" upload makes that upload "finished".
    • If the 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 next PATCH 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 next PATCH 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:

  • In the 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.

    • Included in what, the final 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).
      It seems beneficial to me to word that logic exactly like in the Creation extension.

Thanks for considering / answering those points!

Can't visit the website as Bitdefender complains

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?

Errors when building assets

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

Demo doesn't seem to be working

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:

https://i.imgur.com/74bpqT0.png

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.

demo: improve endpoint configuration

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:

  • Seems like .js files are not interpreted as templates by jekyll, so {{ site.demo.url }} isn't accessible
  • Jekyll seems to have no concept of environment configs, so we'll have to come up with something for that ourselves.

This is not urgent, but a nice to have.

Inaccesible menu

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.

image

Improve onboarding experience

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:

  • Add a guide covering general topics, including
  • What tus is about and why it matters
  • When tus should be used and when not
  • How the specification is structured
  • How to get started with tus (e.g. using tusd and maybe a command line tool)
  • How to integrate tus into existing applications
  • Improve the About/Community page:
    • Replace the images of all watchers with a list of their name (or consider even removing it at all). Loading > 1100 images is not acceptable IMHO
    • Add instructions on how to contact the community (email of core members, Slack channel, Twitter account and GitHub repo)
    • Add slackin: https://github.com/rauchg/slackin

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.

Unable to resume uploads, Upload-Offset is always 0

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.

unable to install npm dependencies

I cloned this repository in my local machine & when I try to install npm dependencies I'm getting some issues. Could you please help me ? Herewith I attached screen shot for your reference.

screenshot_1

Companies that (plan to) use tus

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.

Publish an update describing progress on 1.0

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?

Migrate tus website from Lanyon -> Eleventy

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).

Wrong certificate for tus.io

Hi! Newcomer here! ๐Ÿ‘‹

It seems that when visiting tus.io you get a certificate for github.com instead of one meant for your domain.

Screenshot 2021-10-13 at 20 35 10

Screenshot 2021-10-13 at 20 35 17

add logging

this way we can tell what files were uploaded, how fast, etc.

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.