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

showPreview option is not covered in all cases #1083

Closed
6 tasks done
BakasuraRCE opened this issue Sep 18, 2017 · 0 comments
Closed
6 tasks done

showPreview option is not covered in all cases #1083

BakasuraRCE opened this issue Sep 18, 2017 · 0 comments

Comments

@BakasuraRCE
Copy link

BakasuraRCE commented Sep 18, 2017

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of bootstrap-fileinput.
  • This is not an usage question. I confirm having read the plugin documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

  1. Set showPreview to false
  2. Upload any file
  3. Return an error response in the server
  4. The error happend

Expected behavior and actual behavior

In the OnSuccess event the variable $thumb is not defined when showPreview are disabled:

self._setPreviewError($thumb, i, self.filestack[i], self.retryErrorUploads);

This happens too in:
#1082

Maybe this is happening in other parts of the code.

Temporal Fix:

  1. Set showPreview to true

  2. Null the preview template

    'layoutTemplates': {
        'preview': ''
    },
    
  3. Define one custom class for elErrorContainer

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