Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
inventionpro authored Sep 7, 2024
1 parent 4e0c6f5 commit 9ef1b13
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
function dragOverHandler(ev) {
ev.stopPropagation();
ev.preventDefault();
document.getElementById('selection').close();
document.getElementById('style').innerHTML = `#sub {
display:block !important;
transform: translate(-50%, -50%);
Expand All @@ -111,6 +112,7 @@
}
// Pre process files
function fileHandle(ev) {
document.getElementById('selection').close();
ob = {
stopPropagation: function(){},
preventDefault: function(){},
Expand All @@ -122,11 +124,19 @@
}
// URL
function urlHandle(url) {
alert('unfinished')
document.getElementById('selection').close();
fetch('https://api.fsh.plus/file?url='+url)
.then(res=>res.json())
.then(res=>res.arrayBuffer())
.then(res=>{
let file = new File([uint8], "test.jpg");
let file = new File([res], "file.swf");
ob = {
stopPropagation: function(){},
preventDefault: function(){},
dataTransfer: {
files: Array.from([file])
}
};
dropHandler(ob)
})
}
</script>
Expand Down

0 comments on commit 9ef1b13

Please sign in to comment.