Uppy: upload to store

Created on 4 Jan 2018  ·  12Comments  ·  Source: transloadit/uppy

How to upload files to local file system storage?

Question

Most helpful comment

All 12 comments

When you say local file system do you mean the filesystem of a server? If so there's plenty of options..

You could use Uppy server (https://uppy.io/docs/server - see that it support local disk)
You could use the XHRUpload plugin (https://uppy.io/docs/xhrupload/) and any server scripting that supports file uploads. You can do that in node.js, php, asp.net, Ruby etc. For example in node.js, see step 2 of https://www.w3schools.com/nodejs/nodejs_uploadfiles.asp for a basic example

Thank you!
And what are the alternatives for Ruby?

No idea, never used it.. take a look at https://www.google.co.uk/search?q=ruby+file+upload and there's loads of results

If you want resumable file uploads, you could also run a tus.io server.

(Uppy server does not handle file uploads btw, it’s just a sidecart for importing from Eg dropbox)

Using resumable uploads:

  1. Find and install a http://tus.io implementation for your server.
  2. Use Uppy like this:
Uppy({ autoProceed: false })
  .use(Dashboard, { trigger: '#select-files' })
  .use(Tus, { endpoint: 'https://master.tus.io/files/' }) // your tus endpoint
  .run()
  .on('complete', (result) => {
    console.log('Upload result:', result)
  })

Using regular post-request/XHR uploads:

  1. Configure your server to accept files on a certain route, like http://myapp.com/upload
  2. Use Uppy like this:
Uppy({ autoProceed: false })
  .use(Dashboard, { trigger: '#select-files' })
  .use(XHRUpload, { endpoint: 'http://myapp.com/upload' }) // your apache/nginx/ruby/php endpoint
  .run()
  .on('complete', (result) => {
    console.log('Upload result:', result)
  })

Docs for more options: https://uppy.io/docs/xhrupload/

And what are the alternatives for Ruby?

Just as a reference for future readers, Ruby users can use Shrine for integrating with Uppy. I recently rewrote the Shrine demo to use Uppy, which shows creating an upload endpoint with Shrine and hooking it up to the XHRUpload Uppy plugin. It also shows doing direct uploads to S3 with the AwsS3 Uppy plugin.

Would/could tus be supported with shrine also?

Sent from mobile, pardon the brevity.

On 6 Jan 2018, at 18:59, Janko Marohnić notifications@github.com wrote:

And what are the alternatives for Ruby?

Just as a reference for future readers, Ruby users can use Shrine for integrating with Uppy. I recently rewrote the Shrine demo to use Uppy, which shows creating an upload endpoint with Shrine and hooking it up to the XHRUpload Uppy plugin. It also shows doing direct uploads to S3 with the AwsS3 Uppy plugin.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@kvz It sure is, here is a demo for that as well – https://github.com/janko-m/shrine-tus-demo 😃

I'm actually just wrapping up a new blog post that shows how you can use Uppy & Shrine to upload to a simple endpoint, Amazon S3, and a tus endpoint. I can link to it here as well for completeness.

❤️❤️❤️🙏🙇‍♂️

Sent from mobile, pardon the brevity.

On 6 Jan 2018, at 20:42, Janko Marohnić notifications@github.com wrote:

@kvz It sure can, here is a demo for that as well – https://github.com/janko-m/shrine-tus-demo 😃

I'm actually just wrapping up a new blog post that shows how you can use Uppy & Shrine to upload to a simple endpoint, Amazon S3, and a tus endpoint. I can link to it here as well for completeness.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@arturi @janko-m thank you!

Was this page helpful?
0 / 5 - 0 ratings