Skip to content

Commit

Permalink
🐛 Fixed image paste naming problem. Closed #194
Browse files Browse the repository at this point in the history
  • Loading branch information
WispX committed Apr 16, 2021
1 parent d30a29e commit 1a4a317
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/index/view/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ <h6 class="mdui-m-b-2">请登录后体验</h6>
for (var i = 0; i < len; i++) {
if (items[i].type.indexOf("image") !== -1) {
blob = items[i].getAsFile();
images.push(blob);
var ext = blob.name.substr(blob.name.lastIndexOf(".") + 1)
images.push(new File([blob], new Date().getTime() + "." + ext, {
type: blob.type
}));
}
}
if(images.length > 0) {
Expand Down

0 comments on commit 1a4a317

Please sign in to comment.