mirror of
https://github.com/ente-io/ente.git
synced 2025-08-13 01:27:17 +00:00
[mob]Discard upload to deleted or others collection
This commit is contained in:
@@ -401,6 +401,16 @@ class FileUploader {
|
||||
_logger.severe('Trying to upload file with missing localID');
|
||||
return file;
|
||||
}
|
||||
if (!CollectionsService.instance.allowUpload(collectionID)) {
|
||||
_logger.warning(
|
||||
'Upload not allowed for collection $collectionID',
|
||||
);
|
||||
if (!file.isUploaded && file.generatedID != null) {
|
||||
_logger.info("Deleting file entry for " + file.toString());
|
||||
await FilesDB.instance.deleteByGeneratedID(file.generatedID!);
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
final String lockKey = file.localID!;
|
||||
|
||||
|
Reference in New Issue
Block a user