Fix storage upload to return public URL path
This commit is contained in:
1 parent
d318a1b856
commit
823fbe0cd3
1 file changed
+1
-1
@@ -18,7 +18,7 @@ export class LocalStorageProvider implements StorageProvider {
|
|||||||
const filepath = path.join(this.audioDir, key);
|
const filepath = path.join(this.audioDir, key);
|
||||||
await mkdir(path.dirname(filepath), { recursive: true });
|
await mkdir(path.dirname(filepath), { recursive: true });
|
||||||
await writeFile(filepath, data);
|
await writeFile(filepath, data);
|
||||||
return key;
|
return `/audio/${key}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUrl(key: string, _expiresIn?: number): Promise<string> {
|
async getUrl(key: string, _expiresIn?: number): Promise<string> {
|
||||||
|
|||||||
Reference in new issue
Block a user