file already protected handled
This commit is contained in:
parent
60b90f2f4d
commit
c8ce3b1f94
|
|
@ -85,6 +85,11 @@ async function protectFileWithHotFolder(
|
||||||
|
|
||||||
Logger.debug(who + 'File uploaded successfully', { fileStorageId: uploadResult.fileStorageId, fileName, correlationId });
|
Logger.debug(who + 'File uploaded successfully', { fileStorageId: uploadResult.fileStorageId, fileName, correlationId });
|
||||||
|
|
||||||
|
// check if the file is already protected
|
||||||
|
if (uploadResult.protected) {
|
||||||
|
throw new Error('File is already protected');
|
||||||
|
}
|
||||||
|
|
||||||
originalFileStorageId = uploadResult.fileStorageId;
|
originalFileStorageId = uploadResult.fileStorageId;
|
||||||
|
|
||||||
// Protect the uploaded file with HotFolder
|
// Protect the uploaded file with HotFolder
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue