add file property to drag data
This commit is contained in:
1 parent
c904411190
commit
ada246c12e
11 files changed
+133
-77
No files matched your search
@@ -45,19 +45,7 @@ static INTERPRETER_JS: Lazy<String> = Lazy::new(|| {
|
||||
const type = target.getAttribute("type");
|
||||
if (type === "file") {
|
||||
async function read_files() {
|
||||
const files = target.files;
|
||||
const file_contents = {};
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
|
||||
file_contents[file.name] = Array.from(
|
||||
new Uint8Array(await file.arrayBuffer())
|
||||
);
|
||||
}
|
||||
let file_engine = {
|
||||
files: file_contents,
|
||||
};
|
||||
const file_engine=await serializeFileList( target.files);
|
||||
contents.files = file_engine;
|
||||
|
||||
if (realId === null) {
|
||||
|
||||
Reference in new issue
Block a user