FileUpload Previewing with File Name not based on Stored Field
I'm uploading an image using the FileUpload component using the following code where the image name is not stored in one of the database fields and it is stored in the public directory directly.
This uploads the image correctly into the public folder. Is there a way I can get it to preview the image in the filepond component when I go back into the form to edit the record?
This is the config for the public disk:
Thank you.
2 Replies
you should see the image in the edit. if you aren't seeing then the path is wrong. common mistake in this case app_url isn't set in the .env
Verified the APP_URL and it is set correctly. Is there a way to set a custom preview URL?
I am using the simple modal forms and the mutateFormDataBeforeFill() was not working so I switched to regular resources and it works with the following to show the preview:
Is there a way to use the mutateFormDataBeforeFill when using simple modal form resources?