data-uri

Data URI link <a href="data: doesn't work in Microsoft Edge

隐身守侯 提交于 2019-12-30 02:47:17
问题 This simple code works perfectly everywhere except Microsoft Edge: <a href="data:text/plain;charset=utf-8,Test">link</a> [JSFiddle] In Microsoft Edge I'm getting "That's odd...Microsoft can't find this page" error: Examples from Mozilla documentation also do not working with the same result. Here's the output from Edge console: This error occurs when opening a new edge window, on new tabs it inputs data:text/plain;charset=utf-8,Test as search query into the default search engine. It seems

How to save file from textarea in Javascript with a name? [duplicate]

∥☆過路亽.° 提交于 2019-12-29 02:06:40
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Using HTML5/Javascript to generate and save a file I want a client side HTML/JS solution to solve this problem - I have a user-edittable textarea A, a textfield B and a button C. When user clicks on C, she gets a file download with name equal to B.value and contents equal to A.value. I looked at this but it does not specify how to set the filename and I don't want a Flash solution like this. We can assume users

How to save file from textarea in Javascript with a name? [duplicate]

荒凉一梦 提交于 2019-12-29 02:06:25
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Using HTML5/Javascript to generate and save a file I want a client side HTML/JS solution to solve this problem - I have a user-edittable textarea A, a textfield B and a button C. When user clicks on C, she gets a file download with name equal to B.value and contents equal to A.value. I looked at this but it does not specify how to set the filename and I don't want a Flash solution like this. We can assume users

Merge two dataURIs to create a single image

左心房为你撑大大i 提交于 2019-12-28 18:05:25
问题 I want to generate images consisting of a label and an icon. The label part is going to vary a lot (50-100) while there are about 10 icons. I would like to make the final images in a modular way by splitting the final image in two parts, a label image and an icon image. I will build a service that returns dataURI for the labels while the icon dataURIs will be embedded in the page. Then I would like to combine these two different dataURIs to create a single dataURI representing a combined

Setting img src to a data url via work does not work in IE8?

主宰稳场 提交于 2019-12-24 05:22:39
问题 When I attempt to set an image to use a data url via JavaScript (from this question) , it does not appear to work in IE8. The page in that first link has: <img id="foo" src="alphaball.png"> On line 25, this JavaScript code executes: document.getElementById('foo').src = img_src; On all other browsers (including IE9b) this successfully changes the image from the alphaball to a picture of my head. On IE8, I see the alphaball very briefly, and then it is replaced with a missing image icon. Is

HTML image tag with base64 string (data URI)

[亡魂溺海] 提交于 2019-12-24 01:52:37
问题 I get binary data of jpeg images from a series of httprequests about every 50-200 ms, I convert this data to a base64 string and insert the string in the img tag with javascript. var img = document.getElementById('img1'); img.src = 'data:image/jpeg;base64,' + b64str + ''; So when receiving greater pics, I experience that the image (first displayed fully) after some seconds get cut down from the bottom more and more until it reaches a certain point. I searched a bit and found Internet Explorer

converting dataURI to File to use in Parse - javascript

对着背影说爱祢 提交于 2019-12-23 21:43:53
问题 I was able to follow some steps to create a canvas element from a selected image file, then create an image from that canvas element. I need to do this so the image sent to parse isnt a huge file. Now I need to be able to access that image in the form of a file and upload through parse. I'm a bit stuck as far as how to go about accessing the blob that's is created. consider this: //upload post $('#fileselect').bind('change', function(e) { readURL(this); setTimeout(function() { var canvas =

Is there any way to specify a suggested filename when using data: URI?

冷暖自知 提交于 2019-12-23 14:04:18
问题 If for example you follow the link: data:application/octet-stream;base64,SGVsbG8= The browser will prompt you to download a file consisting of the data held as base64 in the hyperlink itself. Is there any way of suggesting a default name in the markup? If not, is there a JavaScript solution? 回答1: Use the download attribute: <a download='FileName' href='your_url'> Live example on html5-demos.appspot.com/.... Currently works on Chrome, Firefox, Edge, Opera, and desktop Safari but not iOS Safari

Detect data URI in links support with Modernizr

醉酒当歌 提交于 2019-12-22 08:21:10
问题 Using data URI in links ( <a href="data: ) is not supported in IE and Microsoft Edge (Data URI link <a href="data: doesn't work in Microsoft Edge). I'm trying to use Modernizr to detect data URI in links support. Modernizr.datauri is not quite what I'm looking for, as it does not tell anything about support data URI in links, e.g. for Microsoft Edge it returns object {over32kb: true} How can I detect using Modernizr if data URI in links is supported in browser? 回答1: I had the same need for

Creating a Data URI's from SCSS

爱⌒轻易说出口 提交于 2019-12-22 01:19:09
问题 I am trying to get a SVG to process into a DATA URI, It would make my code a lot easier to maintain, rather than reams of code. $white:rgb(255,255,255); background:$white inline_image("/images/select-arrows.svg") no-repeat 92% center; This is what I have to far, I am using modernizr for fallback however I am manually using an online converter, I am running scss with compass installed. These are being complied by codekit 2. Compass Config: require 'compass/import-once/activate' http_path = "/"