Home » Jquery » javascript – Is there anyway to change the path of a blob from URL.createObjectURL

javascript – Is there anyway to change the path of a blob from URL.createObjectURL

Posted by: admin February 22, 2020 Leave a comment

Questions:

I am using GMS1.4 HTML5 module and i’m currently trying to import sprite images to it. The issue is i don’t want to save it in the local directory and since there is a built in function that allows the sprite to be added from a URL i was thinking of just using a blob to get the job done so the temp sprite is erased from memory after the user is done with the game.

The problem is 1.4 is sandboxed so all url links and references seems to point to the Local storage. instead of

blob:http://mysite.co/85cad96e-e44e-a1f9-db97a96ed3fe

it’ll preapped like this

http://mysite.co/html5game/blob:http://mysite/85cad96e-e44e-a1f9-db97a96ed3fe

Im only assuming its due to the sandbox nature of GMS and there does not seem to be a way to turn it off. my next idea is since it wants to be stubborn about using the sandbox directory, was to just create the blob within that folder. Is it possible to create at path and URL.createObjectURL?

How to&Answer: