* add file service interface initial * pr feedback * use abstract fileservice for file service plugins * update plugin loader for services * implement fileservices with abstractFileService and convert to ts * update fileservice interface * remove fileservice loading of old interface * re-add loading of old fileservice interface * re-rename digital ocean fileservice to javascript * revert s3 to js * revert minio to js * remove irrelevant method implementation * rename download stream method to reflect upload stream method * update fileservice * use isFileService in loaders * remove fields from js class * rename "generatePresignedDownloadUrl" to "getPresignedDownloadUrl" * make methods abstract in AbstractFileService * create download stream endpoint (#1583) * Feat/upload to storage (#1580) * add test generate endpoint to api * rename method to getUploadStream * cleanup generate example * upload file example * remove comment * make vars const * Feat/create presigned download url (#1582) * implement "generatePresignedDownloadUrl" * add get-download-url endpoint for testing * remove examples * update index ts * create generalized method for aws update in DO fileservice * update bucket configuration * update interface types * add typings to fileservice methods * update service loaders * update fileservice interface to extend transaction base service * create download stream endpoint (#1583) * Feat/upload to storage (#1580) * add test generate endpoint to api * rename method to getUploadStream * cleanup generate example * upload file example * remove comment * make vars const * Feat/create presigned download url (#1582) * implement "generatePresignedDownloadUrl" * add get-download-url endpoint for testing * remove examples * update index ts * create generalized method for aws update in DO fileservice * update bucket configuration * update interface types * update download method name * revert changes * add filekey and optional extension to the fileservice result * add key to the result of getUploadStream * rename key to filekey * rename key to filekey in getUploadStream result * rename key to filekey in getDownloadStream and getPresignedDownloadUrl * rename key to fileKey for getUploadedFileType Co-authored-by: olivermrbl <oliver@mrbltech.com>
medusa-file-spaces
Upload files to a DigitalOcean Space.
Learn more about how you can use this plugin in the documentaion.
Options
{
spaces_url: "https://test.fra1.digitaloceanspaces.com",
bucket: "test",
endpoint: "fra1.digitaloceanspaces.com",
access_key_id: "YOUR-ACCESS-KEY",
secret_access_key: "YOUR-SECRET-KEY",
}