Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview consumes all Browser Resources #633

Closed
cocheok opened this issue May 13, 2016 · 0 comments
Closed

Preview consumes all Browser Resources #633

cocheok opened this issue May 13, 2016 · 0 comments

Comments

@cocheok
Copy link

cocheok commented May 13, 2016

Hi, the library some problems when you try to preview large size videos. The solution that i found is to put some restriction on fileinput.js like this:

  ```
    if(self.maxFilePreviewSize != undefined && file.size > self.maxFilePreviewSize) {
                self._previewDefault(file, previewId);
                self._initFileActions();
            }

maxFilePreviewSize is a new input parameter that informs the maximum size that a preview could have, in the case that the maxFilePreviewSize is smaller than the file size it shows the image.

I insert it in 

                ```
readFile = function (i) { 
                            ....
                            ....
                            if (!self.showPreview) {
                                   self.addToStack(file);
                                   setTimeout(readFile(i + 1), 100);
                                   self._raise('fileloaded', [file, previewId, i, reader]);
                                   return;
                              }
                             My solution
                             ...
                             ....
                         }

Please ulpload this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants