adonespitogo / angular-base64-upload

Converts files from file input into base64 encoded models.
283 stars 121 forks source link

Maximum file size #72

Closed ixeldog closed 7 years ago

ixeldog commented 8 years ago

Is there a maximum file size? When I try and upload a file of 35MB, the browser crashes. I've narrowed it down to this code: for (var i = 0; i < len; i++) { binary += String.fromCharCode( bytes[ i ] ); } Is this control capable of handling large files of these sizes?

adonespitogo commented 8 years ago

It depends on the amount of RAM you have. This directive is not supposed to be used for large files.

adonespitogo commented 7 years ago

There is an option do-not-parse-if-oversize that prevents parsing large files to avoid browser crash:

<form name="form">
  <input type="file" ng-model="files" name="files" base-sixty-four-input do-not-parse-if-oversize>
</form>