Anvil handling of wav files

Hi there,

I’m unsure if this is the appropriate place to put this since the error I’m receiving isn’t technically from anvil.

I’ve constructed an anvil blob object that stores audio as a wav file using the code below:

anvil_blob=anvil.js.to_media(js_blob,content_type=‘audio/wav’,name=f’Audio_{ID}.wav’)

I’ve then exported that object to my google drive, and it appears as a playable wav file there. However, when I try to connect the wav file to other packages, I get an error about missing a Riff Header.

My question is does storing the file as a blob object corrupt the file in any way by enabling it to lose some of it’s properties?

Any suggestions on how to fix this in Anvil would also be greatly appreciated.

Thanks

I don’t know enough JavaScript to tell whether it’s messing up your blob or not.

However, if you can, you might want to use Anvil’s FileLoader component. If this doesn’t work, then the Anvil experts can try to help you.

Thanks for the response. I ended up saving the file as an mp3 and calling a function to convert it to wav. It takes longer for the code to run, but it works.