Closed gathanasprot closed 1 year ago
I'm wondering why you have .toString('binary')
. I think you can just pass the result of Buffer.from(Base64EncodedImage,'base64')
as the url
parameter.
Does that work?
Also if it doesn't work, could you please share the GIF you're using so it's easier to debug? thanks!
I'm wondering why you have
.toString('binary')
. I think you can just pass the result ofBuffer.from(Base64EncodedImage,'base64')
as theurl
parameter.Does that work?
Also if it doesn't work, could you please share the GIF you're using so it's easier to debug? thanks!
Results are the same even without .toString('binary');
Here is the GIF as text file (in base64) : https://send.firefox.com/download/7153d3a625d9443c/#mtRXmD6r9qfdXdiphzNgYQ
It's pretty huge (approximately 7mb) mind you.
I'll take a look a bit later .. thanks for the gif!
Hey @gathanasoulias, I'm sorry, the link expired before I had a chance to download it. Would you be able to send it again somehow? I can try to download it in the next several hours.
@benwiley4000 this is the new link: https://send.firefox.com/download/5844d64f97e1b826/#7TVcJ1z6syKVvpPtAfC6JA
Got it! Thank you.
I am confused.
let imageBuffer = new Buffer.from(Base64EncodedImage,'base64').toString('binary');
Where is the data? Is Base64EncodedImage
just a placeholder that should be replaced with something like transformer.result
below?
transformer = new FileReader
transformer.readAsDataURL(image)
transformer.result
Browser hangs on this script, never giving any console.log output. In documentation it states that instead of an URL you can use a Memory Buffer. I am doing something wrong?