How to upload to uppy-server?


#1

so, I set up uppy on the frontend and integrated uppy-server into an existing express app. however I can’t seem to figure out what URL to use to upload to uppy-server. I’m sure I’m missing s.th. obvious here.

server config:

const options = {
	debug: true,
	secret,
	// ...
	server: {
		host: `localhost:3000`,
		protocol: 'http',
		// path: '/upload',
	},
	filePath: './uploads/'
};

I’ve tried the simplest possible setup with just a HTML form:

<form action="http://localhost:3000" method="post">
	<input type="file" name="files[]" multiple="">
	<button type="submit">Upload</button>
</form>

but that doesn’t work. – I’m getting a 404 error.
similarly I tried

const uppy = Uppy({
	debug: true,
});
uppy.use(XHRUpload, {
	endpoint: 'http://localhost:3000/',
});

but to no avail.


#2

It seems you are trying to upload your files directly to uppy-server. This is not what uppy-server is built for.
The purpose of uppy-server is to help you import remote files from known providers, e.g Dropbox, Instagram, GoogleDrive, and then upload them to your target server. Uppy-server itself does not serve as a target upload server.

does this make sense to you?


#3

I had the same misunderstanding. Would that mean if wanted to implement Uppy client for standard file upload (from client device) I would need to also implement a Tus server?

Thanks!


#4

you need to be running a tus server somewhere yes, but you don’t have to implement it yourself. There are existing implementations you can run standalone. See https://github.com/tus/tusd/releases/


#5

Gotcha - Thanks I actually did find that and play with the Docker image now. Thanks!


#6

Just curious do you know if any load / performance testing has been done between the Go and Node versions of the Tus server?