jquery-imageuploader.js---A little jquery plugin that creates a UI for uploading a set of files to the server
![]() |
select demo |
![]() |
drag demo |
The plugin loads images with selecting or dragging,which have rendering thumbnails.
Github here
Step1:
link jquery, imageuploader.js
imageupload.css (option)
Step2:
html
![]() |
html |
form action is to the server address.
Step3:
js
![]() |
js |
the default options attributes:
Option Name | Description | Default Value |
---|---|---|
submitButtonCopy | What you want the upload submit button to say | Upload Selected Files |
instructionsCopy | What the first set of instructions say | Drag and Drop, or |
furtherInstructionsCopy | What the second set of instructions say | You can also drop more files, or |
selectButtonCopy | What the primary file select button says | Select Files |
secondarySelectButtonCopy | What the secondary file select button says | Select More Files |
dropZone | The jQuery element where the uploader should listen for drop events | $('body') |
fileTypeWhiteList | The whitelist of file extensions to allow to be selected (case-insensitive) | ['jpg', 'png', 'jpeg', 'gif', 'pdf'] |
badFileTypeMessage | What the error says when someone selects a file thats not allowed because of type | Sorry, we're unable to accept this type of file. |
ajaxUrl | The url to send the file batch to when its submitted | /ajax/upload |