Spaces:
Runtime error
Runtime error
Akshar2325 commited on
Commit ·
2c01ad8
1
Parent(s): e639e9d
refactor(wasabi-storage): improve comments on file deletion process and update description for fileUrl query parameter
Browse files
src/shared/modules/upload/wasabi-storage/wasabi-storage.controller.ts
CHANGED
|
@@ -265,7 +265,8 @@ export class WasabiStorageController {
|
|
| 265 |
@ApiQuery({
|
| 266 |
name: 'fileUrl',
|
| 267 |
required: true,
|
| 268 |
-
description:
|
|
|
|
| 269 |
})
|
| 270 |
async uploadVideoFromDirectUrl(@Query('fileUrl') fileUrl: string) {
|
| 271 |
if (!fileUrl) {
|
|
|
|
| 265 |
@ApiQuery({
|
| 266 |
name: 'fileUrl',
|
| 267 |
required: true,
|
| 268 |
+
description:
|
| 269 |
+
'Can be either: 1) filePath (videos/1234567890-movie.mp4) OR 2) fileUrl (http://localhost:3000/wasabi/file?path=...) from presigned response',
|
| 270 |
})
|
| 271 |
async uploadVideoFromDirectUrl(@Query('fileUrl') fileUrl: string) {
|
| 272 |
if (!fileUrl) {
|
src/shared/modules/upload/wasabi-storage/wasabi-storage.service.ts
CHANGED
|
@@ -711,15 +711,7 @@ export class WasabiStorageService {
|
|
| 711 |
);
|
| 712 |
});
|
| 713 |
|
| 714 |
-
//
|
| 715 |
-
if (localFilePath) {
|
| 716 |
-
fs.unlink(localFilePath).catch((error) => {
|
| 717 |
-
this.logger.error(
|
| 718 |
-
`Failed to delete local temp file: ${localFilePath}`,
|
| 719 |
-
error,
|
| 720 |
-
);
|
| 721 |
-
});
|
| 722 |
-
}
|
| 723 |
|
| 724 |
return {
|
| 725 |
uploadId,
|
|
|
|
| 711 |
);
|
| 712 |
});
|
| 713 |
|
| 714 |
+
// Note: Local temp file will be automatically deleted by processVideoAsync after conversion completes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 715 |
|
| 716 |
return {
|
| 717 |
uploadId,
|