Best practices for hosting files for download by customers?

For those that provide files for downloading from you app. How are you doing it?

Did you create a table to store the filename, link, etc?

My end goal is to provide the package desktop app(s) similar to how Wappler does.

Yes. We store actual files in S3 - aws, DO, R2, wasabi or any other S3 compatible service. And just enough data in DB to securely show the list of files to users and download them.

1 Like

Not sure if there is a best practice, it depends on multiple factors. For the account page we have a simple json file which contains the release information, no database. If you have a CMS with an admin dashboard you probably want to store the information in a database. If you want to show all files in a specific folder you can also read the files directly from the filesystem, when no extra metadata is needed.

For secure downloads (members only) you want to have the files in a folder that is not public accessible. You then create a server action with the security provider to restrict access and a download action step.

1 Like

We do this a lot and always use S3/CDN link stored in the DB.

1 Like