fileapi Questions

5

Solved

I have an image URL "https://cdn.shopify.com/s/files/1/0234/8017/2591/products/young-man-in-bright-fashion_925x_f7029e2b-80f0-4a40-a87b-834b9a283c39.jpg", and want to convert it into javaScript Fil...
Overhasty asked 3/6, 2020 at 18:4

2

Solved

I have a big blob for a rar file. To uncompress it I had to use this library unrar.js The blob I am testing with is about 23MB, to readAsArrayBuffer then feed it to unrar.js I had to slice it. F...
Darnelldarner asked 12/2, 2016 at 21:35

10

Solved

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...
Wolcott asked 9/8, 2012 at 3:0

5

I am trying to access the first few lines of text files using the FileApi in JavaScript. In order to do so, I slice an arbitrary number of bytes from the beginning of the file and hand the blob ove...
Catchment asked 17/2, 2021 at 15:19

2

Solved

Hello! My question is about javascript. I want to 1. ask a user to select a directory 2. then write my bunch of files to it (probably with creating sub-directories) without interaction with use...
Storey asked 2/1, 2014 at 17:59

11

Solved

Using FileReader's readAsDataURL() I can transform arbitrary data into a Data URL. Is there way to convert a Data URL back into a Blob instance using builtin browser apis?
Frag asked 28/8, 2012 at 23:21

6

Solved

I need to add a UTF-8 byte-order-mark to generated text data on client side. How do I do that? Using new Blob(['\xEF\xBB\xBF' + content]) yields '"my data"', of course. Neither did '\uBBEF\x22...
Indict asked 26/7, 2013 at 10:37

0

The problem is basically what the title says. The minimal example to demonstrate it is below. This function accepts a File object as an argument from <input type='file' /> field. It creates a...

2

Solved

I'm trying to simply upload a file to a node.js server. To do this, I'm using the file API and readAsArrayBuffer. Here's the code that's called when the input file "change" event is fired...
Wilda asked 22/2, 2019 at 5:27

32

Solved

I have a WebApi / MVC app for which I am developing an angular2 client (to replace MVC). I am having some troubles understanding how Angular saves a file. The request is ok (works fine with MVC, a...
Xeric asked 1/2, 2016 at 19:15

3

Solved

I am reading an array via JavaScript and saving the size of that array in a reader.onload event. I think that the reader.onload function is called when the file has finished uploading. event.targ...
Boles asked 6/1, 2016 at 0:33

3

Solved

Today I faced an interesting thing as FF File API and separate files by their types. OK here is a little snippet as if (!input.files[0].type.match('image.*')) { window.alert("Select image please"...
Monsour asked 13/9, 2011 at 0:27

3

I have extensively and systematically searched for an answer in stack overflow but haven't been able to find one that fits my needs. I am trying to upload a number of files to Firebase Storage, wh...
Marxist asked 7/4, 2019 at 14:13

2

Solved

I use Chrome 12 on Mac OS X and I've included jQuery 1.6.1 within the document. I try to read the contents of a file as text and save it in a data-object with the following function: this.upload ...
Gregale asked 20/6, 2011 at 17:55

6

Solved

I need to convert a dataURL to a File object in Javascript in order to send it over using AJAX. Is it possible? If yes, please tell me how.
Elodia asked 27/7, 2011 at 19:42

7

Solved

var profileImage = fileInputInByteArray; $.ajax({ url: 'abc.com/', type: 'POST', dataType: 'json', data: { // Other data ProfileImage: profileimage // Other data }, success...
Charest asked 14/9, 2015 at 2:54

9

Solved

I'm using the FileReader API to read multiple files. <html> <body> <input type="file" id="filesx" name="filesx[]" onchange="readmultifiles(this.files)" multiple=""/> <div i...
Salient asked 20/12, 2012 at 15:7

1

Solved

I'm running in the browser. I have File (the JavaScript File type) of type application/pdf. I want to check that the format of the pdf is either US Letter (8.5 in. x 11 in.) or US Legal (8.5 in. x ...
Chrysoprase asked 16/9, 2021 at 19:12

3

Solved

I have two base64 encoded in PNG, and I need to compare them using Resemble.JS I think that the best way to do it is to convert the PNG's into file objects using fileReader. How can I do it?
Lais asked 6/6, 2013 at 17:57

4

Solved

In a packaged Chrome app, I'm trying to read from a file in the PERSISTENT storage, and create it if it doesn't exist: window.webkitRequestFileSystem(PERSISTENT, 1024*1024, function(fileSystem) { ...
Carliecarlile asked 17/3, 2014 at 13:27

5

Solved

When readAsText() function is completed the result is stored in .result How do I see if the content of the file read are correct in .result? fr = new FileReader(); fr.readAsText(file); var x ...
Cho asked 5/12, 2012 at 17:48

1

This Question is related to and inspired by How to updoad in old browsers (ex Safari 5.1.4) Given an <input type="file"> element having a files property containing File objects whic...
Hymenopteran asked 5/7, 2016 at 5:37

1

I'm trying to make a (front-end) Javascript that would be able to copy very large files (i.e. read them from a file input element and 'download' them using StreamSaver.js). This is the actual cod...
Glioma asked 12/6, 2020 at 14:50

4

Solved

I require to generate a thumbnail of an image in my web application. I make use of the HTML5 File API to generate the thumbnail. I made use of the examples from Read files in JavaScript to generate...
Urquhart asked 18/9, 2011 at 8:12

1

Solved

I have a web app, where the user can select a local file as input, using the html5 FileReader API. Is there any way I can check if the file has changed, that works in modern browsers? Histori...
Swisher asked 7/6, 2020 at 14:7

© 2022 - 2024 — McMap. All rights reserved.