bloburls

Blob url in internet explorer with angularjs

ε祈祈猫儿з 提交于 2019-12-04 00:29:02
Given this code (from someone else): var module = angular.module('myApp', []); module.controller('MyCtrl', function ($scope){ $scope.json = JSON.stringify({a:1, b:2}); }); module.directive('myDownload', function ($compile) { return { restrict:'E', scope:{ data: '=' }, link:function (scope, elm, attrs) { function getUrl(){ return URL.createObjectURL(new Blob([JSON.stringify(scope.data)], {type: "application/json"})); } elm.append($compile( '<a class="btn" download="backup.json"' + 'href="' + getUrl() + '">' + 'Download' + '</a>' )(scope)); scope.$watch(scope.data, function(){ elm.children()[0]

Windows Edge and opening a blob url [duplicate]

删除回忆录丶 提交于 2019-11-30 09:10:34
This question already has an answer here: Open links made by createObjectURL in IE11 4 answers I'm getting some odd results when trying to open a new window with a blob url in Windows Edge (20.10240.16384, which is the version in the IE11 VM supplied by Microsoft). var xhr = new XMLHttpRequest(); xhr.open('POST', sourceUrl, true); xhr.responseType = 'blob'; xhr.onload = function(e,form) { if (this.status == 200) { var blob = this.response; var url = window.URL.createObjectURL(blob); var w = window.open(url); } } On the line var w = window.open(url); I'm getting an "Access is denied" error

How can I make a really long string using IndexedDB without crashing the browser?

偶尔善良 提交于 2019-11-28 22:40:36
I'm writing a web app that generates a potentially large text file that the user will download, and all the processing is done in the browser. So far I'm able to read a file over 1 GB in small chunks, process each chunk, generate a large output file incrementally, and store the growing output in IndexedDB. My more naïve attempt which kept all the results in memory and then serialized them to a file at the very end was causing all browsers to crash. My question is two-fold: Can I append to an entry in IndexedDB (either a string or an array) without reading the whole thing into memory first?

What is a blob URL and why it is used?

六月ゝ 毕业季﹏ 提交于 2019-11-26 16:51:28
I am having very problems with blob URL. I was searching for src of a video tag on YouTube and I found that the video src was like: src="blob:https://crap.crap" I opened the blob URL that was in src of the video it gave an error. I can't open the link, but it was working with the src tag. How is this possible? Requirements: What is blob URL? Why it is used? Can I make my own blob URL on a server? If you have any additional details Blob URLs (ref W3C , official name) or Object-URLs (ref. MDN and method name) are used with a Blob or a File object. src="blob: https://crap.crap " I opened the blob

How to use Blob URL, MediaSource or other methods to play concatenated Blobs of media fragments?

无人久伴 提交于 2019-11-26 05:35:24
问题 Am attempting to implement, for lack of a different description, an offline media context. The concept is to create 1 second Blob s of recorded media, with the ability to Play the 1 second Blobs independently at an HTMLMediaElement Play the full media resource from concatenated Blob s The issue is that once the Blob s are concatenated the media resource does not play at HTMLMedia element using either a Blob URL or MediaSource . The created Blob URL only plays 1 second of the concatenated Blob