node-bluesky icon indicating copy to clipboard operation
node-bluesky copied to clipboard

Wrting to blob storage fails with a 413 (request body maximum size limit was exceeded)

Open 24X7 opened this issue 11 years ago • 4 comments

Scenario:

  1. Take a picture with iPad Air
  2. Upload picture from iPad through an HTML form post to an Azure Mobile Service API
  3. Error returns (413) due to size of the request. Debugged, and it is being thrown at the bottom lines in my implementation

Relevant usage code: //container varaible below is bluesky container for blobs var readStream = fs.createReadStream(request.files.snapshot.path); readStream.pipe(container.put(corid)); //errors with the 413 on this line response.send(200, {msg: 'photo uploaded'});

If this is by design in anyway and I am just using this wrong LMK or if there is something more that may be helpful I can provide.

24X7 avatar Jun 09 '14 00:06 24X7

Any idea the size of the image that's generating the error? Also, is this a sporadic error, or do you see it every time?

pofallon avatar Jun 09 '14 01:06 pofallon

See it every time. I can get the exact size shortly. Essentially it happens to any image taken with the back camera on iPad Air / iPhone 5s. Front facing camera does not cause the issue. I know the data needs to be chunked in blocks to be uploaded for larger post data (thought though was 64mb).

Sent from my iPad

On Jun 8, 2014, at 6:45 PM, "pofallon" [email protected] wrote:

Any idea the size of the image that's generating the error? Also, is this a sporadic error, or do you see it every time?

— Reply to this email directly or view it on GitHub.

24X7 avatar Jun 09 '14 03:06 24X7

Here is one of the images I took with the rear facing camera. Funny, it actually happens every single time. Was able to repro with other images as well.

image

24X7 avatar Jun 09 '14 03:06 24X7

It is 1.09MB. Seems to hit an issue when going over a 1MB. I looked at your code and did not see an issue off hand; but will debug more and see if I can find it.

24X7 avatar Jun 09 '14 14:06 24X7