I need to save some image files from user directory to the project folder on server, but I cant find working solution. What is the simplest way to select file in users pc and copy it to the server? And what url may I use to acces this file?
Share
Run an FTP(S) server, and use a Java FTP client to connect and upload the files.
You can make the FTP home directory a subfolder of wwwroot on your server, so you can access the uploaded files as “example.com/diagrams/mydiagram”.
Beware though, the client must have the FTP password to connect, therefore your users can upload anything they want (including malicious scripts). If you don’t trust your users, you’ll need per user auth and verification of the uploaded files, which will require server side code.