Linked Questions

0 votes
1 answer
6k views

How to encode .zip file to base64 in javascript? [duplicate]

I need to encode .zip file in base64 format on client side and send it on server (php). But, i cannot find any solutions for that in javascript. i try this: let zipFile = document.getElementById('...
dark's user avatar
  • 33
0 votes
0 answers
277 views

Convert PNG image binary string to base64 with Javascript/JQuery [duplicate]

I'm newbie on this but I have this problem, I'm using an API which gives me as result a PNG image binary string: I want to convert this to base64 and put it as an attribute in an img tag <img id=&...
NekoLopez's user avatar
  • 609
396 votes
14 answers
492k views

Convert SVG to image (JPEG, PNG, etc.) in the browser

I want to convert SVG into bitmap images (like JPEG, PNG, etc.) through JavaScript.
Zain's user avatar
  • 5,501
255 votes
10 answers
413k views

How to get a file or blob from an object URL?

I am allowing the user to load images into a page via drag&drop and other methods. When an image is dropped, I'm using URL.createObjectURL to convert to an object URL to display the image. I am ...
BrianFreud's user avatar
  • 7,344
69 votes
3 answers
202k views

Fetch image from API

Q1) In my reactjs application, I am trying to fetch an API from my backend Nodejs server. The API responds with an image file on request. I can access and see image file on http://192.168.22.124:3000/...
JKhan's user avatar
  • 1,247
38 votes
3 answers
41k views

"Load" event on script with async and/or defer

When embedding scripts like: <script src="..." async defer></script> Is there a way to know when they're finished loading? Usually when the window.load event is called, one would expect ...
Alex Morales's user avatar
  • 2,779
13 votes
5 answers
81k views

Convert Blob to image url and use in image src to display image

How to convert blob to base64/image? I am getting this blob through API call and I am trying to display it in a image. I have tried with stackoverflow answers but nothing could help so I just ...
pjay's user avatar
  • 405
7 votes
1 answer
11k views

Converting MediaRecorder audio to base64

I am using the MediaRecorder API to record audio on my page. I need to convert this audio to base64. Have a look at this example. Each time new data is available, it pushes that data to an array, ...
Luke's user avatar
  • 2,138
4 votes
2 answers
7k views

How to convert FetchAPI parsed Blob Results to Base64

Have this module.exports file which fetches an image from an API endpoint. The API result is then parsed into a blob. After parsing the Blob object looks like this: Blob { [Symbol(type)]: 'image/...
Nadir Abbas's user avatar
6 votes
1 answer
28k views

blob to base64 converstion javascript

I am trying to parse blob object into base64 string in javascript. Please help. my code is var reader = new FileReader(); reader.addEventListener("loadend", function () { // reader.result ...
Fahad Farooqi's user avatar
9 votes
2 answers
5k views

How to Google Speech-to-Text using Blob sent from Browser to Nodejs Server

I am trying to set up a server to receive audio from a client browser using SocketIO, then process it through Google Speech-to-Text, and finally reply back to the client with the text. Originally and ...
Alitron's user avatar
  • 160
4 votes
1 answer
12k views

How to open a PDF File from Blob with Ionic FileOpener and Capacitor

In my Ionic 5 project I have a PDF downloaded to the device (physical iPhone Pro, iOS simulators as well as Android devices). Transformed to Base64 and stored as .txt file. I'm retrieving the file as ...
David Seek's user avatar
6 votes
1 answer
5k views

upload image blob to Cloudinary

Im using react and react-router on the frontend, node+express as my backend and cloudinary to store my image files. The issue Im having is that the cloudinary api method cant seems to open/parse the ...
KornholioBeavis's user avatar
2 votes
3 answers
8k views

How to send blob appended in formData to php

Issue : While uploading large image files i recognized that while uploading on my AWS server having 1gb memory uses it's full capacity, it goes upto 932 mb usage which causes crash to the process. I ...
Satyam Pathak's user avatar
1 vote
2 answers
5k views

create data url from fetched image

TL;DR I'm trying to fetch and image, convert it to base64, and put the data url into an img's src attribute, but it's not working: async function ajax(id) { const tag = document.getElementById(id);...
Alex028502's user avatar
  • 3,714

15 30 50 per page