This service is aimed to be a zero config service for file uploads.
Locally it saves files to your home folder in the actio-files
folder.
In production mode currently it supports Google Cloud Storage. More backends are coming, please open an issue to give ideas to the authors.
As it can be seen my looking at the models file, a File
object consists of:
id?: string;
url?: string;
originalName?: string;
size?: number;
In your services using the FileService
it is sufficient to save the file URL for simplicity.
To upload files, set the Content-Type
request header to "multipart/form-data"
.
The service can accept multiple files.
The service checks the top level isProduction
config value to decide if to save to the local system or to Google Cloud Storage.
See ConfigService for more details.