Jump to content

Letting users upload files


Recommended Posts

I'm trying to let my users upload files in a RESTful spring boot web service.

 

 

I followed this tutorial 

https://www.callicoder.com/spring-boot-file-upload-download-rest-api-example/ 

where the uploaded files will be stored in the local file system.

 

it says to configure what folder the files should be stored in with

file.upload-dir=/Users/callicoder/uploads

But when I package the war-file I must have that folder on my computer, which leads me to believe that it will not work when I deploy it to the server. And sure enough, when I deploy the war-file, I get "deploy failed with error", even though that file is on my "File Manager".

 

Does any one have any tips on how to achieve this? 

or is this not allowed on HelioHost, should I save the files in the DB instead?

Do you have any good tutorials you can point me to?

 

Thanks in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...