Comment on page
This section gives details on how ScaffoldHub implements file storage.
Each feature has its storage configuration file, and you can find it at
id: Unique ID used to identify the rule on permissions and upload.
folder: Folder where the files will be saved. It accepts an
:tenantIdargument that, when saved, is replaced by its real value.
maxSizeInBytes: Max allowed size in bytes.
publicRead: The file can be publicly accessed via the URL without a signed token.
For Amazon S3 and Google Cloud Storage, the uploaded files do not pass through the backend. The backend creates credentials that allow the front end to submit directly to the file storage provider.
Before sending the credentials to the frontend, the backend validates if the user has all the needed permissions.
The localhost differs from the Amazon S3 and Google Cloud Storage. Instead of generating a provider's token, it uses the JWT token of the current application to pass it to another endpoint that only validates this token and handles the upload to the localhost server.