B
B
Boris Khripko2017-01-11 16:56:41
Java
Boris Khripko, 2017-01-11 16:56:41

How to organize the upload of files to the application with further storage in cloud storage?

Hello.
I'm very new to this, so don't judge too harshly.
I wanted to know how to organize the upload of files to the application, and then, for example, to a Yandex disk.
I am making a small web application using Spring, Maven, Tomcat, MySQL, etc., which I will then deploy to a remote server. One of the functions of this application is the ability to specify a link to a file (whether it is on the user's computer or on the network), which must be saved in the Yandex disk in order to be able to use it in the application in the future. I have not yet encountered file uploads. I'm trying to figure it out, but my head is a mess. I would be grateful if you tell me where you can and what you need to read about this case.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
al_gon, 2017-01-11
@BariSovich

Upload from local machine to your application via browser:
https://github.com/spring-guides/gs-uploading-files
commons.apache.org/proper/commons-io
org.apache.commons. io.FileUtils.copyURLToFile(URL, File)
https://github.com/yandex-disk/yandex-disk-restapi-java
https://github.com/yandex-disk/yandex-disk- restapi...
Your application should have a form to accept a file/files from the local PC and
a form to accept a link/links.
After the file is uploaded, it lies in a temporary folder, its status is reflected in the database.
A separate component (Java CLI App) will upload files on a first-come, first-served basis to the cloud. Thus, the load and responsibility is removed from the Web App.
After the file is loaded, the component updates the status in the database and deletes the file from the temporary folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question