Dropzone
https://www.dropzonejs.com/
Issues:
https://github.com/enyo/dropzone/issues/873
http://jsfiddle.net/krmgk883/
https://stackoverflow.com/questions/20533191/dropzone-js-client-side-image-resizing
Import css and dropzone.js
<div class="row">
<div class="col-sm-20 well">
<form action="@Url.Action("_UploadImages", "Notebooks", new { unique = Model.UniqueId })"
method="post"
enctype="multipart/form-data"
class="dropzone"
id="my-dropzone"></form>
</div>
</div>
<script type="text/javascript">
Dropzone.options.myDropzone = {
url: '@Url.Action("_UploadImages", "Notebooks", new { unique = Model.UniqueId })',
autoProcessQueue: true,
uploadMultiple: true,
parallelUploads: 3,
maxFilesize: 10,
resizeWidth: 2048,
addRemoveLinks: false,
init: function () {
}
}
</script>
this.dropzone = new Dropzone(element, {clickable: this.clickable,
thumbnailWidth: this.thumbnailWidth,
thumbnailHeight: this.thumbnailHeight,
maxFiles: this.maxFiles,
maxFilesize: this.maxFilesize,
resizeWidth: 800,
resizeHeight: 800,
resizeQuality: 0.7,
dictRemoveFile: 'Remove',
addRemoveLinks: this.showRemoveLink,
acceptedFiles: this.acceptedFiles,
autoProcessQueue: this.autoProcessQueue,
dictDefaultMessage: '<i style="margin-top: 3em;display: inline-block" class="material-icons">' + this.defaultMsg + '</i>',
dictMaxFilesExceeded: 'max 20 images',
previewsContainer: '#imageList',
previewTemplate: '<li class="dz-preview dz-file-preview"> <div class="dz-image" style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" ><img style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" data-dz-thumbnail /></div> <li class="dz-details"> <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <i class="material-icons">done</i> </div> <div class="dz-error-mark"><i class="material-icons">error</i></div></li>',
source: this.source,
init() {
// console.log('init()')
// vm.$emit('upload-pictures_init', [])
},
Ok...
回复删除What I'm going to tell you might sound pretty weird, maybe even kind of "out there"....
BUT what if you could just hit "PLAY" to listen to a short, "magical tone"...
And suddenly attract MORE MONEY to your LIFE?
And I'm talking about thousands... even MILLIONS of DOLLARS!!
Think it's too EASY? Think it's IMPOSSIBLE???
Well then, I've got news for you...
Sometimes the most magical miracles life has to offer are the SIMPLEST!!
Honestly, I will provide you with PROOF by letting you PLAY a REAL "magical money-magnet tone" I developed...
And TOTALLY FOR FREE
You just click "PLAY" and you will start having more money come into your life. starting so fast, you will be surprised.
CLICK here to play this marvelous "Miracle Money-Magnet Tone" as my gift to you!!