Questions tagged [data-uri]

A data URI is a URL whose scheme part is 'data:' and which directly represents a resource, rather than the location of a resource.

Filter by
Sorted by
Tagged with
1 vote
1 answer
58 views

React access <canvas/> ref of a child component

I'm trying to save canvas as PNG file on the press of a button. This is my code for now: (this part is working) const canvasRef01 = useRef(null); const saveAsPng = () => { const canvas = ...
Leo's user avatar
  • 23
1 vote
1 answer
38 views

Does JavaScript not work on data URI pages in WebKit?

On Chrome on Android, JavaScript on a data URI page consisting of the following HTML <html> <head> </head> <body> <a href="javascript:alert('Hi.');">Say hi</...
Melab's user avatar
  • 2,614
0 votes
4 answers
145 views

Decode .jpeg image from string

In my JS script I'm receiving string with encoded image.jpeg. The image is created with OpenCV in C++: cv::imencode(".jpeg", rgb_img, jpeg_data); std::string jpeg_string(jpeg_data.begin(), ...
DR4NKR1D3R's user avatar
0 votes
1 answer
66 views

Function button to take a screenshot and download it as an image file

I'm trying to develop a button that simply takes a screenshot of the current tab and downloads it (this may seem useless, as we can take screenshots manually, but I plan to extend the button's ...
user173026's user avatar
0 votes
1 answer
27 views

SVG gradient works as stand alone HTML but not when embeded in CSS [duplicate]

My SVG gradient works as isolated HTML, but doesn't work when embeded into CSS background attribute. I want to embed SVG into my CSS so I can have some complicated backgrounds. I started with a basic ...
Kmus's user avatar
  • 41
0 votes
1 answer
56 views

Is it possible to make a reversible atob from btoa?

Why can't btoa convert back a base64 string? let b64 = "abc123" console.log(btoa(atob(b64))); //abc12w== What happened in the end of the string? I store images in localStorage as DataURI ...
Dan Froberg's user avatar
0 votes
0 answers
116 views

Certain iOS images fail to POST in Capacitor

Our Capacitor application involves uploading an image, so we use "@capacitor/camera" to prompt the user to choose an image from their gallery; this works perfectly fine in Android, but fails ...
Alitron's user avatar
  • 118
1 vote
1 answer
76 views

How to treat long Data uri in codes

I use data URI, base64 to add images and videos to my games, but I found if I want to make a game with multiple videos it will be really bad code with more than 500 lines for each video, so is there ...
a_7md.f's user avatar
  • 33
0 votes
0 answers
92 views

MongoParseError: Invalid scheme

I am working on connecting to a MongoDB Atlas database but continue to get this error: MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+...
Th3H3lpfulC0d3r's user avatar
2 votes
1 answer
307 views

Opening a computed document using window.open() and data: scheme

I have a webpage running in a browser that generates a computed HTML document, and I want to open that document in a new browser tab. The simple and dirty method is to do this: const w = window.open(''...
Fawfulcopter's user avatar
-1 votes
2 answers
448 views

Convert image from url into data uri in node.js

I have been looking for a JavaScript solution to converting an image from an external url to a data uri. I have installed multiple packages and tested multiple methods but have not been able to find ...
WillDevv12's user avatar
0 votes
0 answers
52 views

Loading PDF from base64 results in empty file url

Based on this answer I'm trying to open a PDF in the web view of my app. private func handlePdf(url: String) { // get the base64 encoded part of the url let base64String: String = String(url....
Cr0w3's user avatar
  • 120
0 votes
1 answer
59 views

Await doesnt wait till a variable is set in an sync function [duplicate]

I am trying to get dataURI for an image using ApexCharts.exec method, here is my code: const getDataURI = async() => { console.log('leftChartObj', leftChartObj) // gets the data required ...
iNam524's user avatar
  • 68
1 vote
1 answer
205 views

Get DataURL from Blob with await

I have fetch results that I want to turn into a typed DataURL. I want to use await in the mainline of my app, not callbacks.
Larry K's user avatar
  • 48.1k
3 votes
0 answers
2k views

How do I encode a "raw" image import in Vite to Base64?

I have a JPG that I import in Vite like import data from "whatever.jpg?raw";. My goal is to encode the resulting raw JPEG string as a data URI like data:image/jpeg;base64,DATA. The JPEG is ...
Aaron Beaudoin's user avatar
1 vote
1 answer
201 views

File PDF not showing in iframe with javascript dataUri docoument.querySelector

I have a project to display pdf file data in iframe with dataUri, but it's not showing. Please help me File Index.php <iframe src="" id="iframe" ></iframe> <input ...
Zainal Abidin's user avatar
0 votes
2 answers
887 views

How to extract data URL from image binary data received from WhatsApp API?

Requirement I am using WhatsApp API to receive and send messages. Now, someone sent me an image and the response I am getting by API is in the form of binary data as shown in the screenshot below. (...
Samson's user avatar
  • 23
0 votes
0 answers
27 views

Image to DataURI to Blob. Is this Stackoverflow answer deprecated or is my code wrong? [duplicate]

Im trying to convert an image to BLOB and based my code on this SO post: Blob from DataURL? I can't tell if my code is wrong or if there's something wrong with the code from the SO post. Somewhere ...
Eric Andre's user avatar
1 vote
1 answer
58 views

Messages between Master to Worker are not passed fully when using "Cluster Mode"

I am getting a VERY weird issue when working with cluster mode. Running Express as my framework Somehow while using express body parser during that time, the expected size > the received size ...
matan yemini's user avatar
-1 votes
2 answers
116 views

How does one retrieve and collect base-64 data-urls from the files-property of a multiple file input type?

I am working on a front end project where I want to store only 2 images, previousImage and nextImage, and show them on a div called previousWeek and nextWeek respectively. I am using // retrieve file ...
JoyBhalla's user avatar
1 vote
1 answer
724 views

PDFMake Base64 generates malformed document

I'm using PDFMake to generate some PDF reports on client side. When I specify the definition for document and pass it to createPdf(DEFINITION_HERE) I get my PDF and it looks nice and shiny. But I'm ...
whatamidoingwithmylife's user avatar
1 vote
1 answer
1k views

Display pdf file over 2MB using embed element

I am making an application that brings up a preview of PDF files. Embedding with an embed element works well for small PDF files but fails for larger PDF files because of the size limits for data urls....
trinalbadger587's user avatar
2 votes
1 answer
411 views

He does not allow me to send images with a size greater than 800kb

I created a flow in Power Automate for it sent scheduled mails from a Sharepoint list, the Sharepoint list contains columns such as Subject, Recipient, Hyperlink, Date and Time sent, and additional I ...
user avatar
1 vote
0 answers
21 views

First stream freezes after seccond connection opens?

I'm constructing an application that allows multiple devices to stream their webcam, through the browser, to another device. Each streaming device takes a DataURL image from the webcam and sends it ...
John Smith's user avatar
1 vote
1 answer
337 views

Bootstrap-Table data-url receiving records but not showing data in MVC

When calling a method, GetEmployee in this example, it is correctly showing 2 records but with a dash instead of the data. I'm guessing it is a Json issue in the controller but have been unable to ...
Steve's user avatar
  • 13
1 vote
2 answers
206 views

Data URL web worker loses security context

I am creating a web worker using a data URL in a local html file. The file has a secure context but the worker does not. Specs say they should be the same. Have I messed up, is the spec wrong or ...
eiffie's user avatar
  • 46
0 votes
1 answer
139 views

JavaScript small image on data url [duplicate]

I am trying to capture the users webcam and upload it to my backend. I found out how to generate a data url (e.g. data:image/jpeg;base64,/9j/4A...) from the webcam stream. But the data url is always ...
Kurt's user avatar
  • 33
0 votes
1 answer
506 views

How to navigate to data URL?

I am making am making a data URL generator, and I am making the link to the generated data URL. Here is some sample code that links to a data URL. <a href="data:image/svg+xml;base64,...
Caleb Liu's user avatar
  • 687
1 vote
1 answer
1k views

Not allowed to navigate top frame to data URL

I am making a data URL generator, and the last part of this project is the "open in new tab" button. But when I clicked the "open in new tab" button, it opens about:blank. I looked ...
Caleb Liu's user avatar
  • 687
1 vote
0 answers
413 views

Injecting a script tag from a content script to an iframe with data URI src throws a 'web_accessible_resources' error even tho it's set correctly

I'm working on an extension that injects a piece of code into iframes. I'm using manifest v3 and I have a content script that injects a script tag with my code into the iframes. The issue comes when ...
user19487433's user avatar
0 votes
0 answers
237 views

CSS SVG background-image as data-uri: is there a way to access ids/classes in that SVG with 'external' CSS

I have a website / application that uses different color themes. Those themes are provided in css-custom-properties: like: :root{ --main-color: red; --lighht-color: gray; --dark-color: brown; ...
user avatar
2 votes
0 answers
469 views

Downloading file from dataUrl results in `null` text displayed on Chrome, when hovering the file's "download tile"

I'm using the following code to force-download a file (so browser doesn't decide to open it in a new tab): const fetchFileAndConvertToDataURL = async (mediaUrl: string): Promise<string> => { ...
Michal Kurz's user avatar
  • 1,692
0 votes
0 answers
378 views

How to dynamically change SVG data URI as background image in REACT?

I have a container that has a background image pattern. This pattern is passed in as a data URI specifically because I needed to dynamically change the fill of pattern through a prop I pass in when ...
Laiqa Mohid's user avatar
0 votes
1 answer
109 views

React - Trying to pass SVG fill color as a prop while using svg as data in background image property?

I wish to dynamically change the fill color of a svg pattern that I'm using as a background image property in a container. I am doing this through using the data uri and directly injecting the SVG ...
Laiqa Mohid's user avatar
0 votes
0 answers
410 views

Font file data URL violates unsafe-inline content security policy

I'm trying to reference a font file saved as a data URL (trimmed below for readability). <link type="text/css" rel="stylesheet" href="data:application/octet-stream;base64,...
raul's user avatar
  • 1,229
0 votes
1 answer
283 views

SVG as Data URI doesn't render (no <image> tag)

I have the following svg: <svg viewBox="0 0 16 16" fill="transparent" stroke="black" stroke-width="2" xmlns="http://www.w3.org/2000/svg" id="icon-tick" style="width: 12px; height: ...
jobu1342's user avatar
  • 150
0 votes
1 answer
2k views

Dynamically create and embed data URL in Angular

In my Angular application, I have the following invariable basic conditions: The application dynamically loads a ZIP file from an external URL. Within this ZIP file, there's a HTML file which is to ...
ahuemmer's user avatar
  • 1,742
0 votes
1 answer
2k views

Rendering React SVG Components as images (using DATA URI)

Hi to optimize my huge svg components I'm tryin to do something similiar to this tutorial: https://medium.com/@ians/rendering-svgs-as-images-directly-in-react-a26615c45770 , so far I've come up with ...
math's user avatar
  • 167
0 votes
1 answer
766 views

How can I remove the base64 header from a data URI with Go?

I want to remove a base64 header from a base64 data URI, for example given: data:video/mp4;base64,TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz I want to remove the ...
ReZ's user avatar
  • 341
1 vote
1 answer
731 views

Load GLTF file that is not located in Public folder

I found a problem that I cannot load GLTF files into a scene if I cannot place them in the Public folder in my React application. For example, I have MyPVPanel.gltf, and I want to load it in react app ...
GTFTT's user avatar
  • 121
8 votes
1 answer
723 views

Is there a way to index the images generated by "Next/Image Component" in Google Image Search?

I am having issues with indexing the images that are optimized by the Next/Image component these images are in the public folder of my Next.js app. I haven't seen any examples where any resource/URL ...
Adam Hill's user avatar
  • 315
0 votes
2 answers
2k views

React-easy-crop just returns a blob url

I am using react-easy-crop to allow users to modify their profile pictures after uploading. The problem I am experiencing is that after cropping, the image is returned in the form of a blob url like ...
sgt_pepper85's user avatar
1 vote
0 answers
872 views

cannot dynamic import from data-uri in jest

In the Node.js REPL I can dynamic import like this: Welcome to Node.js v16.13.2. Type ".help" for more information. > let m = await import('data:text/javascript,export const x = 5;') [...
joegomain's user avatar
  • 606
0 votes
1 answer
334 views

Clear blob and data urls from browser

we currently have a web app based on NodeJS where data is gathered and its charts are presented as images using the plotlyJS. Below shown is one such code snippet which creates a chart of the data as ...
Moon1007's user avatar
3 votes
1 answer
1k views

Markdown: How to resize image defined with a base64 data uri

In markdown, I would like to embed a base64 image data uri. ![description](data:image/png;base64, --base64 png--) Is there any way to resize the rendered image in markdown?
gaitat's user avatar
  • 12.4k
1 vote
0 answers
297 views

Do the Google Docs Embed Viewer or the Office Embed Viewer support BLOB or DATA URLs?

Talking about these: https://docs.google.com/viewer?embedded=true&url= https://view.officeapps.live.com/op/embed.aspx?src= I want to show a .ppt or .pptx in an iframe but I don't use file URLs in ...
Stino Valentino's user avatar
0 votes
1 answer
46 views

Data URIs -- is it possible to have multiple formats overlapping?

Let's say I had a background gif like this: data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////...
daveaneo's user avatar
0 votes
2 answers
128 views

Redirecting user to another link

I have two links (www.link1.com) and (www.link2.com), i want whenever a user clicks on link1, he'll be redirected to link2. This is easy to do, but what if I don't want full link2 url written anywhere ...
Hither Joe's user avatar
1 vote
0 answers
320 views

How to get redirected url in flutter which open app?

I define host URL in my Flutter app <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT&...
Azhar Ali's user avatar
  • 2,119
1 vote
0 answers
667 views

Create and download an UTF8 plain text file from JS (browser)

I'm stucking on a problem that I cannot understand. I got an HTML page, declaring <meta charset="utf-8" />, attempting to create and download a text file, containing some UTF8 ...
MadPapo's user avatar
  • 495

1
2 3 4 5
12