Cannot import WASM file

I have a .wasm file on my computer, and I’m trying to import the file into Glitch. However, when I try to upload the file into my project, it keeps setting the .wasm file as an asset:
image

How can I upload my .wasm file into the file explorer?

Get the .wasm URL (Remove everything after the ? part in the URL, that’s a timestamp)

Go into your project console and use wget [the URL]

4 Likes

@eris’s directions are correct for the time being. I asked the team if we can just let .wasm files into the app folder instead of Assets and it’s now on their list to make happen. I’ll update in here when that should start working!

1 Like

wasm is a binary format, so it’ll be complicated to send it through the editor’s protocol, which communicates text in UTF-8. I’m also endorsing the asset → wget approach

Using wget worked, thanks! However, the server seems to serve the resulting .wasm file with a MIME type of application/octet-stream, instead of the expected application/wasm MIME type:
image

Is there any way to change this?
Thanks in advance

we don’t have any control over that for static projects. you can convert to a full stack project and add a response header manually if you want

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.