Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » How do you use assets.scratch.mit.edu?
- mtech22
-
1000+ posts
How do you use assets.scratch.mit.edu?
I know I already did make a topic about this, but I've been looking for it and I can't seem to find it. Also, the method I remember being given did not seem to work, so I'm asking again.
How do you use assets.scratch.mit.edu? Without browser extensions, as I know there are ones that do so for you, but is there a way to use it without them?
How do you use assets.scratch.mit.edu? Without browser extensions, as I know there are ones that do so for you, but is there a way to use it without them?
- fdreerf
-
1000+ posts
How do you use assets.scratch.mit.edu?
Using assets without getting an extension to do it for you is extremely painful. Don't do it.
- Jeffalo
-
1000+ posts
How do you use assets.scratch.mit.edu?
theres a site made by lefty, but i dont know if he wants many people to use it, because it uses one of his accounts to make the images.
as fdreerf stated, uploading with assets manually is extremly painful and nobody should do it.
here's how you do it:
#1 use scratch
go to a new project, import a costume of the image you want.
then open your browser's debugger's network log and watch what happens when you save. see the one that looks like someone smashed their hands on the keyboard? that's the image.
double click on the request, and if all goes well, you should now see your browser prompting you to download an image. yay!
#2 be an epic gamer
generate an md5 hash of your image, make an http post request to https://assets.scratch.mit.edu/ {hash}.{file-type}, make sure to include your token if you're not running this in your browser's debugger in the context of a logged in scratch session.
the body of the request should be the file you want to upload.
if all goes well, scratch will respond with some json with a key called ok. otherwise, scratch will throw some stupid error that will not help with debugging whatsoever and you will be forced to try over and over and over many many times and world_languages will be upset that you haven't cleaned up your image uploader code yet and threaten to remove it from the browser extenstion.
as fdreerf stated, uploading with assets manually is extremly painful and nobody should do it.
here's how you do it:
#1 use scratch
go to a new project, import a costume of the image you want.
then open your browser's debugger's network log and watch what happens when you save. see the one that looks like someone smashed their hands on the keyboard? that's the image.
double click on the request, and if all goes well, you should now see your browser prompting you to download an image. yay!
#2 be an epic gamer
generate an md5 hash of your image, make an http post request to https://assets.scratch.mit.edu/ {hash}.{file-type}, make sure to include your token if you're not running this in your browser's debugger in the context of a logged in scratch session.
the body of the request should be the file you want to upload.
if all goes well, scratch will respond with some json with a key called ok. otherwise, scratch will throw some stupid error that will not help with debugging whatsoever and you will be forced to try over and over and over many many times and world_languages will be upset that you haven't cleaned up your image uploader code yet and threaten to remove it from the browser extenstion.
- mtech22
-
1000+ posts
How do you use assets.scratch.mit.edu?
Not really.
-snip-I'll try that, thanks. (This is resolved pretty much now.)
- Discussion Forums
- » Questions about Scratch
- » How do you use assets.scratch.mit.edu?