Is it possible to upload a file in Play! framework only by giving a path in url?
For example I would like to call:
www.mywebsite.com/upload_PATH
It’s for me quite important, because I would like to upload and process a lot of data. Selecting manually 1000 files is too much time consuming and I want to write a program which will make it for me 🙂 I’m using Play with Java.
If
upload_PATHis a local file path on your system, it is not a good way to go.You should write a Play action where you can upload a file, as it is done in this example.
Then, you should write a HTTP client (started by a
mainJava method) which go through your files and upload then calling the Play! action. You can use the httpclient Apache library for writing the client part.