feat: Add s3-compatible plugin for the file module (#7143)

This commit is contained in:
Stevche Radevski authored and GitHub committed 2024-04-25 09:06:47 +02:00
1 parent abf1283ab6
commit f341265f42
18 files changed
+1599 -4

No files matched your search

@@ -1,4 +1,4 @@
import { FileTypes } from "@medusajs/types"
import { FileTypes, LocalFileServiceOptions } from "@medusajs/types"
import { AbstractFileProviderService, MedusaError } from "@medusajs/utils"
import fs from "fs/promises"
import path from "path"
@@ -8,7 +8,7 @@ export class LocalFileService extends AbstractFileProviderService {
protected uploadDir_: string
protected backendUrl_: string
constructor(_, options) {
constructor(_, options: LocalFileServiceOptions) {
super()
this.uploadDir_ = options?.upload_dir || "uploads"
this.backendUrl_ = options?.backend_url || "http://localhost:9000"