M
M
m0dE2014-04-11 08:44:16
Data storage
m0dE, 2014-04-11 08:44:16

Uploading a file to cloud storage in a specific account?

A file is a video file. I used to upload it to YouTube after this article habrahabr.ru/post/69006 . Now you need to get rid of such a load. Is it possible to upload a file to the cloud storage to a specific account through a form so that it is immediately uploaded to the service server? I do not need the file to be uploaded through the form to my temporary directory first, and then also sent to their site.
If this is not possible, then at least upload somewhere so that I can get a link to download the file.
Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Damir Makhmutov, 2014-04-11
@doodoo

If you send a file inside a form that has the "multipart/form-data" directive, then most likely the server itself saves the file to a temporary directory for subsequent work with it (I just assume that the server behaves this way).
So that it does not save to a temporary directory, you need to send the file inside the http request yourself, as a base64 string, for example. Here you need js File API.
(I strongly do not recommend doing this, there is nothing wrong with the server saving the file to a temporary directory)
Thus, on the server side, you will receive a regular request that contains a base64 string. You can decode it on the fly and send it to any cloud storage.
dropbox has an API, you can use it. You can use AWS S3. You can really use anything.

V
Vitaly Zheltyakov, 2014-04-11
@VitaZheltyakov

On Habré there were several articles on the implementation of automatic saving of data in the cloud using PHP. Look for

T
Therapyx, 2015-09-07
@lynnikvadim

keep examples davidwalsh.name/css-flip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question