You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've pulled a snippet here from Dev tools where the issue appears:
Call stack is:
Uncaught (in promise) TypeError: entry.createReader is not a function
at UUIFileDropzoneElement._mkdir (@umbraco-ui_uui.js?v=62ffc2fe:7595:26)
at UUIFileDropzoneElement._getAllEntries (@umbraco-ui_uui.js?v=62ffc2fe:7573:40)
at UUIFileDropzoneElement._onDrop (@umbraco-ui_uui.js?v=62ffc2fe:7654:43)
As code lines: UUIFileDropzoneElement._getAllEntries
conststructure=awaitthis._mkdir(dir);
UUIFileDropzoneElement._mkdir
constreader=entry.createReader();
Full snippet:
async_getAllEntries(dataTransferItemList){constqueue=[...dataTransferItemList];constfolders=[];constfiles=[];for(constentryofqueue){if((entry==null ? void0 : entry.kind)!=="file")continue;if(entry.type){constfile=entry.getAsFile();if(!file)continue;if(this._isAccepted(file)){files.push(file);}}elseif(!this.disallowFolderUpload&&this.multiple){constdir=this._getEntry(entry);if(dir){conststructure=awaitthis._mkdir(dir);folders.push(structure);}}}return{ files, folders };}/** * Get the directory entry from a DataTransferItem. * @remark Supports both WebKit and non-WebKit browsers. */_getEntry(entry){letdir=null;if("webkitGetAsEntry"inentry){dir=entry.webkitGetAsEntry();}elseif("getAsEntry"inentry){dir=entry.getAsEntry();}returndir;}// Make directory structureasync_mkdir(entry){constreader=entry.createReader();constfolders=[];constfiles=[];constreadEntries=(reader2)=>{returnnewPromise((resolve,reject)=>{reader2.readEntries(async(entries)=>{if(!entries.length){resolve();return;}for(constenofentries){if(en.isFile){constfile=awaitthis._getAsFile(en);if(this._isAccepted(file)){files.push(file);}}elseif(en.isDirectory){constdirectory=awaitthis._mkdir(en);folders.push(directory);}}awaitreadEntries(reader2);resolve();},reject);});};awaitreadEntries(reader);constresult={folderName: entry.name, folders, files };returnresult;}
Steps to reproduce
In Umbraco backoffice:
Create a media document type
Export this media type to a UDT file
Now try to import it via drag and drop
Look in the devtools console
Expected result / actual result
To be able to upload the file.
The text was updated successfully, but these errors were encountered:
Which exact UI Library version are you using? For example: 1.0.1 - don't just write v1.
1.9.0
Bug summary
You can't drag and drop UDT files on the
uui-file-dropzone
because they don't have a MIME type.Related to: umbraco/Umbraco.CMS.Backoffice#2258
Specifics
I've pulled a snippet here from Dev tools where the issue appears:
Call stack is:
As code lines:
UUIFileDropzoneElement._getAllEntries
UUIFileDropzoneElement._mkdir
Full snippet:
Steps to reproduce
In Umbraco backoffice:
Expected result / actual result
To be able to upload the file.
The text was updated successfully, but these errors were encountered: