fix drag and drop upload issue (#1310)

This commit is contained in:
Abhinav Kumar 2023-08-11 02:41:54 +05:30 committed by GitHub
commit a2d2ea4f9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -682,10 +682,15 @@ export default function Uploader(props: Props) {
if (isFirstUpload && !importSuggestion.rootFolderName) {
importSuggestion.rootFolderName = FIRST_ALBUM_NAME;
}
if (isDragAndDrop.current && props.activeCollection) {
if (isDragAndDrop.current) {
isDragAndDrop.current = false;
uploadFilesToExistingCollection(props.activeCollection);
return;
if (
props.activeCollection &&
props.activeCollection.owner.id === galleryContext.user?.id
) {
uploadFilesToExistingCollection(props.activeCollection);
return;
}
}
let showNextModal = () => {};
if (importSuggestion.hasNestedFolders) {