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

hope to use only preview function #863

Closed
wenbaofu opened this issue Feb 5, 2017 · 3 comments
Closed

hope to use only preview function #863

wenbaofu opened this issue Feb 5, 2017 · 3 comments

Comments

@wenbaofu
Copy link

wenbaofu commented Feb 5, 2017

@kartik-v 👍 At first, thanks for your great component, I had used it in my demo (bootstrap-fileinput + nodeJS + Angular2),now it work fine.

I want to use preview function of fileinput in Angular2(because I had upload into server,user can check the file in new page,then they can preview the video and PDF),like below

image

for PDF, I want to use preview in red part,and like what show in file-input
image

so if there is any simple way to just use this function,pls tell me,thank you...

@wenbaofu
Copy link
Author

wenbaofu commented Feb 5, 2017

I had red source code,I find below function will handle the click event,and the create the page of preview

_initZoomButton: function () {
            var self = this;
            self.$preview.find('.kv-file-zoom').each(function () {
                var $el = $(this);
                handler($el, 'click', function () {
                    self._zoomPreview($el);
                });
            });
        },

if Ishould add a button in my page with class "kv-file-zoom" ?

@kartik-v
Copy link
Owner

kartik-v commented Mar 2, 2017

It must be a button inside each preview thumbnail with class .kv-file-zoom currently. Will update later if there is a enhanced method to do this.

@kartik-v
Copy link
Owner

kartik-v commented Mar 2, 2017

New plugin method zoom is available to preview content for a specified thumbnail frame id.

ert78gb added a commit to ert78gb/bootstrap-fileinput that referenced this issue Mar 3, 2017


* 'master' of https://github.com/kartik-v/bootstrap-fileinput: (269 commits)
  Ensure events are namespaced correctly
  Update message for single file upload
  Updates to release v4.3.9 fixes kartik-v#863 fixes kartik-v#887
  Updates to release v4.3.9 fixes kartik-v#875 fixes kartik-v#885 fixes kartik-v#886
  Updates to release v4.3.9
  Fix kartik-v#882: Correct image resize validation
  Update es.js
  Updates to release v4.3.8
  Updates to locales
  Added Russian translation for msgUploadEmpty
  Fix kartik-v#874: Enhance/Standardize CSS Styles for Krajee Default Theme
  Fix noFilesSelected in es.js
  Fix kartik-v#872: Correct typo in `bootstrap.min.css`
  Updates to release v4.3.8
  Fix kartik-v#870: Correct config.width parsing
  Update to release v4.3.7
  Updates to release v4.3.7
  Updates to release v4.3.7
  Updates to release v4.3.7
  Correct function typo
  ...
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