Open niccokunzmann opened 6 years ago
I'm not sure this is (entirely) possible, because many sites prevent cross-origin resource sharing (CORS). So, if Scratch tries to make a fetch to download an image on a domain without CORS, the browser prevents the request and the image doesn't load. Snap!, an editor/programming language based on Scratch, does let you drag an image from a separate webpage to load it into the editor, but if you try to drag in an image from somewhere that blocks CORS, it'll show a message. Implementing this into Scratch would have to work the same way.
@towerofnix I can't see a problem with it working that way, but something would need to be added to the URL pasting window to let people know not to post the failure of this feature in the Suggestions or Bugs & Glitches forum. Obviously which sites will/won't allow CORS requests is beyond ST's control.
Maybe a compromise could be that you could drag and drop from your computer?
Dragging and dropping would be a great compromise.
This way, it is fast and in many cases a familiar interaction for users.
@hedgehog125 @niccokunzmann I can see many problems with this:
A potential reason for wanting direct loading from URL is that you are on a device without much storage or with a slow internet connection, in which case downloading and then re-uploading could be problematic
There is no drag-and-drop on mobile devices
In some browsers, dragging a file into the browser window causes the browser to open the file in the tab that the file is dropped into (thereby closing whatever is in the current tab). I had some issues with this in 2.0.
Users of low-end hardware may find that this process is very slow because it takes a while for their file manager to load.
Expected Behavior
Please describe what should happen
When I add a new sprite e.g. for minecraft, I surf the internet, find a picture. I would like to include this picture by its URL.
Actual Behavior
Describe what actually happens
I need to download and save the picture. Then, I can upload it from my computer.
Steps to Reproduce
Explain what someone needs to do in order to see what's described in Actual behavior above
Operating System and Browser
Firefox 52, Linux