Writing HTTP POST content to could storage? - http-post

is it possible to create a file in my Dropbox/Google drive (or any could service) via HTTP POST and GET only ?
I want to send a HTTP POST with text content in it and whatever the content is it will be written to a file in my storage.
i was able to do this on a free web hosting using PHP but it is possible to be done on could or maybe is it possible to host PHP on cloud so i can use the same PHP code the i used on the site ?

Yes, this is possible. For Dropbox, see https://www.dropbox.com/developers/core/docs#files_put.

For Drive, see Uploading files. It talks through the steps for uploading file content over http.

Related

Saving dropzone.js files to local storage?

Is it possible to store dropzone.js files in local storage? I read the docs and looked all around the web for examples but there were none, so it is even possible?
It is posible. The part that you have to understand is that dropzone.js gives you the user experience, how you handle the docs or images in your server side is something different. You can try using ajax.
For example if you are using C# you have to handle how and where is going to be saved those docs. You need to define a folder in your disk where those docs are going to be stored.

Importing files from Dropbox using API v2 to a server(web-to-web)

I am trying to implement Dropbox on my website and so far I've been able to upload, fetch file metadata, user details and also download the file on my local machine(using the Dropbox API v2).
But, I would like to import the file directly from Dropbox and upload it to the server to be processed further....I'm able to generate the link for the chosen file using the "Chooser"
Dropbox API explorer lists all the possible APIs dropbox can provide.
To build the website I'm using laravel 5.6.17
Your help would be much appreciated. Thanks in advance

How can I upload multiple files from urls directly to cloud storage

I've tried some of the services out there, including droplet, ctrlq.org/save, and some other sites that support directly fetching a file from a url and uploading it to dropbox, google drive and the like. Without the user having to store the file on a local disk.
Now the problem is none of these services support multiple urls or batch uploading, but I have quite a few urls and I really need a service where I can put them in, split them with enters or semicolons, and have the files uploaded to dropbox.(or any other cloud storage)
Any help would be gladly appreciated.
The Dropbox Saver JavaScript control allows you to save up to 100 files to the user's Dropbox in one shot. You'll need to programmatically create the button using Dropbox.createSaveButton as explained in the linked page.
It seems like the 100-file limit (at any one time) is universal, but you might find that it isn't the case when using the DropBox REST API. It looks possible to do this with NodeJS server side (OAuth and posts) or Javascript client side (automating FileReader). I'll review and try to add content so these aren't just links.
If you can leave a page open for about 20 minutes due to "technical limitations", the dropbox should be loadable 100-at-a-time like that, assuming each upload takes less than 2 seconds; it's an easy hook to add a progress indicator.
If you're preloading the dropbox once yourself or the initial load is compatible with manual action, perhaps mapping a drive and trying to unzip an archive of your links to it would work. If your list of links isn't extremely volatile then the REST API could be used to synchronize changes.
Edit: Forgot to include this page on CloudConvert, which unzips archives containing up to 100 files into DropBox. Your use case doesn't seem to include retrieving the actual content at your servers (generated zip files), sending the automation list to the browser and then having the browser extract to dropbox, but it's another option.
The Dropbox API now offers the ability to save a file into Dropbox directly via a URL. There's a blog post about it here:
https://blogs.dropbox.com/developers/2015/06/programmatically-saving-a-url-to-dropbox/
The documentation can be found here:
https://www.dropbox.com/developers/core/docs#save-url

how to serve or force file download located from a different directory in meteor to client browser

A user comes to my site and inputs something, and my site generates a file as an output.
Unfortunately i cannot place the generated file on the public directory - as you all now Meteor watches this and restarts every time the public folder content is changed.
so my generated files lives in .meteor/local/build/programs/server/files
so for example i have document.pdf that lives in that directory, I'd like to serve/force/trigger a file download to my client's browser that lets his browser download this document.pdf file.
In general Its not a very good idea to do this. It makes it very hard to scale your app. Node isn't good at serving chunky static files either.
Then also if you have two servers there is a slight chance that the other one's data is requested (e.g if you use a download manager).
I'm not sure but I think Meteor's live code reload doesn't work/is switched off in when in production mode (when using meteor deploy or meteor bundle)
The best thing to do would be to upload your file to S3 and then redirect the user to the file there.
You can also use Iron Router and server side routes to create a dynamic file download.
See Iron Router Server Side docs. Then you set your content type to application/pdf and send back the file directly without saving it to the filesystem. If you need to you can also save it in some other folder and serve it up yourself.
Then have a peek at this answer for an example of reading in and streaming out a file:
Node JS file downloads using a stream.
Since this is a server side route, using express and Iron Router, you shouldn't have to mess with any of the fibers related async issues.

Send HTTP POST through FileMaker Pro

I'm trying to do a simple image POST to a php script through FileMaker Pro. I have the image in a container. Is there a way to post this to my URL so that I can use the normal PHP upload etc to take care of the processing? Any plugin etc that can help me do this?
Thanks.
The easiest way that I know of is to use a third party plug in like:
http://www.troi.com/software/urlplugin.html
Because you can't just "get" the contents of the container you'll need to write the container to disk and then use a plugin like troi file to "read" in the image data. You may also want to use a plugin like troi text to encode the image before uploading (base64 is pretty common) and then decode it on the php side.

Resources