How to use the plupload.Uploader function in plupload

To help you get started, we’ve selected a few plupload examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chenkanqin / evue / src / packages / form / packages / upload / upMixins.js View on Github external
}
      };
      /**是否需要拖动上传*/
      if (option.isDrop) {
        config['drop_element'] = this.browseButton;
      }
      /**
       * 配置上传类型
       * array
       * [{title: "Image files",extensions: 'gif,jpeg,jpg,png,bmp'}]
       * */
      if (option.mimeTypes) {
        config.filters['mime_types'] = option.mimeTypes;
      }

      this.evueUploader = new plupload.Uploader(config);
      this.evueUploader.init();
      this.$emit('evueUploader', this.evueUploader)
    },
    startUp() {
github phpdish / phpdish / assets / modules / upload-file.js View on Github external
constructor(selectorId, options){

        this.selectorId = selectorId;
        this.options = $.extend({
            headers: {

            },
            onUploaded: (response, file) => {
            },
            onError: (error) => {
                Util.dialog.message(error.code + ": " + error.message + '; ' + Translator.trans('upload.try_again_after_refresh'))
            }
        }, options);

        this.uploader = new plupload.Uploader({
            runtimes : 'html5,flash,silverlight,html4',
            browse_button : selectorId,
            url : Util.route.getRoutePath('upload'),
            file_data_name: 'file',
            filters : {
                max_file_size : '2mb',
                mime_types: [
                    {title : Translator.trans('upload.try_again_after_refresh'), extensions : "jpg,gif,png"}
                ]
            },
            headers: this.options.headers,
            init: {
                FilesAdded: function(uploader) {
                    uploader.start();
                },
                FileUploaded: (uploader, file, result) => {

plupload

Plupload is a JavaScript API for dealing with file uploads it supports features like multiple file selection, file type filtering, request chunking, client side image scaling and it uses different runtimes to achieve this such as HTML 5, Silverlight and F

AGPL-3.0
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis