File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/addons/addons/drag-drop Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -62,10 +62,11 @@ export default async function ({ addon, console }) {
62
62
( el = e . target . closest ( 'div[class*="selector_wrapper"]' ) )
63
63
) {
64
64
callback = ( files ) => {
65
- const hdFilter = addon . settings . get ( "use-hd-upload" ) ? "" : ":not(.sa-better-img-uploads-input)" ;
65
+ // do not use HD uploads if we drop a GIF, Scratch will split its frames individualy.
66
+ const hasGif = [ ...files ] . some ( f => f . type === "image/gif" ) ;
67
+ const hdFilter = ! hasGif && addon . settings . get ( "use-hd-upload" ) ? "" : ":not(.sa-better-img-uploads-input)" ;
66
68
const fileInput = el . querySelector ( 'input[class*="action-menu_file-input"]' + hdFilter ) ;
67
69
fileInput . files = files ;
68
- console . log ( files ) ;
69
70
fileInput . dispatchEvent ( new Event ( "change" , { bubbles : true } ) ) ;
70
71
} ;
71
72
} else if ( ( el = e . target . closest ( 'div[class*="monitor_list-monitor"]' ) ) ) {
You can’t perform that action at this time.
0 commit comments