File Upload + Save to Remote Server Question


#1

How do i upload a file and save it to a remote server? JS does not really do ftp does it?

(1) Upload file, then save locally in public folder. Then, on server side, run a child process to do an curl process?
(2) Upload file, then save locally in public folder. Then, on server side, use xmlhttprequest to use ftp to get the file to the remote server? (Apparently it does ftp). Would this work on galaxy?
(2) Upload file, then save locally in public folder. Run cron job on server to upload files to remote server? Would this work if I’m using galaxy?

Thanks so much.

Tat


#2

For file uploads I would look at something like edgee:slingshot.

I would avoid trying to upload files to local storage. Most container-based Meteor application deployments (including Galaxy) don’t support any permanent local storage - it will be blown away if the container is migrated, for example.


#3

Hey mate - most appreciated thank you. Had a quick look, and it seems to fit the bill quite nicely. As a question, is the child process method doable at all?

As in, get some info, generate some files (a cluster generally) using a third party library, and then upload these to a remote server. For example, say uploaded some js files (for viewing as text on a app somewhere). Then try to run jsdoc on the files, and create document files, which then get uploaded to the remote server. Its a dodgy example, but just trying to illustrate a scenario.


#4

I’ve certainly run other non-Meteor processes from Meteor, so in principle what you want to achieve should be doable.