#How to work with file uploads

7 messages · Page 1 of 1 (latest)

full canopy
#

HI, i am implementing file uploads for the first time and I am facing 2 problems:

  1. after uploading the file and clicking save, it loads indefinitely (see screenshot) even though I can see it's been uploaded to my disk and it's filename saved to my DB.
  2. When I reload this page, the file upload is empty again I'd like for it to show the already uploaded file so the user knows a file exists already.

This is the code I am using to implement this:

FileUpload::make('signature')->acceptedFileTypes(['image/png'])->maxFiles(1),
full canopy
#

problem 1. is fixed, but I still don't see my image when I reload the page

full canopy
#

figured out the other issue, turns out my column was set to hidden on my model

sacred dirgeBOT
primal cargo
#

Hey @full canopy , I'm exactly having the first problem you have. Can you guide me through how you did solve it?

primal cargo
#

nvm, i found a solution. If you have the same problem, make sure .env APP_URL same with the actual url

full canopy