Previewing files in file Uploader

I have a created a custom view for updating a record which has the content of a record in it including a file uploader. Among the data that is passed to the view, there is an array called attachments which holds the path to some files related to that respective record.

What I would like to do is, to view those files in file uploader, so I can remove them or reorder them.
I have tried passing the attachments array to ->default() method of the file uploader, but it does not work.

I ve explored the documentation, and searched on the internet, but found nothing useful. I wonder if someone can help me out to figure the solution out.

File paths in attachments array looks like this subfolder/filename.jpeg.
Files are in public folder, so they are publicly accessible.
Was this page helpful?