I am working on a page where users can view / upload local files. Once the file is selected, I am displaying the image in the page. I have encountered a problem that crashes my browser window (chrome) by dragging this image.
Simple HTML:
& lt; Input Javascript (jQuery):
$ ('Input') {var file = $ ('input'). Get (0) .files ; Var fileRedder = new file reader (); fileReader.onload = function (e) {$ ('img') .attr ('src', e.target.result);}; fileReader.readAsDataURL (file [0]) ;}); Speaking of a bit more, it seems that with big image files (such as uncompressed photos from the iPhone), this is a problem. It is not necessary that the page be a dealer-breaker, but definitely drag one image and instantly get bothered to crash the page.
Is there a good way to fix this?
Post-text "itemprop =" text "= undefined & window.phill reader! == undefined) {var reader = new FileReader (); Var self = this; Reader.odo = function (e) {if (window.Blob) {var blob = new blob ([e.target.result]); Window.URL = window.URL || window.webkitURL; Var blobURL = window.URL.createObjectURL (blob); Self.setSrc ({"tempUrl": blobURL}); // Using spinal cord refers to this one model}}; reader.readAsArrayBuffer (file); } Else {if (! File) console.error ("no file was paused"); If (! Window.FileReader) console.error ("Your browser is not supported"); }
As I could see, readAsDataURL kills memory.
Popular posts from this blog
I have a big code, for a game I'm calling Tommy's Kumamak. I know that this is not beautiful, but I am very naive and for some reasons I know from using arrays, anyway, my problem is that I can not add a variable outside the listener and within the action listener I can modify the variable (pTurn ++) from How can I go about adding a count to that variable from inside the action listener? 1 error was found: file: c: \ user \ public \ togiz_kumalak.java [line: 130] error: local variables pTurn is accessed from within internal class; Need to be declared final int pTurn = 0; Button1.addActionListener {new zero-action action (action event e) {pTurn ++; if (pTurn% 2 == 0) {display.append ("\ n Player 2 cup 1");} If ( PTurn% 2! = 0) {display.append ("\ nPlayer 1Cup 1")}}); In that case, move the contents of the functionalities into orbit and then call the action For example, display the method from: Private Zero Button Press {pTurn ++; If (pTurn% 2...
I tried to use custom-made YouTube fun cats when I ran 5 cell arrays in 30 seconds and then a Throwing a serious error. I tried to know that I have been made an infinite loop, but he did not install it. iPhone 5S 32GB [Price] => 0 [Description] => A new apple product [Image_URL] = & Gt; [Business_ID] = & gt; 6 [keyword] = & gt; ["iPhone", "iPhone 5s", "Apple", "32 GB"]) [1] = & gt; array ([name] = & Gt; iPhone 4S 32g [Price] => 300 [Description] => Apple iPhone 4S = [Image_URL] => [Business_ID] => 6 [Keyword] = & gt; [ "IPhone 4S", "" iPhone "," Apple "," 32 GB "])) search: $ searchTerm =" iphone 5s "; Code: if (! SearchTerm below!) {$ SearchTermWords = Explosion (" ", $ searchTerm); $$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ['Keyword']; $ bKeywords = $...
I am new to programming with C, and I need elsewhere that I can read on file compression in C I am I only need a simple accredited method, for example it will help but mostly I can read it to understand. Probably a good starting point RLE is very simple but it is not so insignificant to apply see it :
Comments
Post a Comment