| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2018-01-16 | 2.5 kB | |
| v1.0.2.tar.gz | 2018-01-16 | 18.5 kB | |
| v1.0.2.zip | 2018-01-16 | 26.5 kB | |
| Totals: 3 Items | 47.5 kB | 1 | |
Make sure you read README.md for more details about each change. There is a ALOT
- The big change on this version is that now we have different modes.
- Depending on the new options:
autoandqueueis how the plugin handles the uploads. - Uploads may or may not start automatically depending on those settings.
- The plugin behaves the same way (as in previous versions) if using the default settings
-
Check the online demos to see the different modes: https://danielmg.org/demo/java-script/uploader
-
Plugin API
After initialization now we have a few public Methods to interact with the plugin.
startcancelresetdestroy
See methods section for details on each.
- New options
-
auto,queue,dnd,hookDocument,multiple,headers -
Options changed
fieldNameRenamed. Previously known asfileName(was removed)extFilterNow is an Array: Example['png','jpg','gif','jpeg']-
extraDataNow it can ALSO be a function, useful for example you need dynamic values. -
Options removed
fileNamerenamed tofileName-
maxFilesFunctionality removed.Users expected diferent things from it (completed uploads, or files added, or some more dynamic stuff)
Good news is that NOW you can implement your own validation checks now on the
onNewFilecallback.
See options section for details
- Callbacks changed
-
onNewFileIf a return value is provided and is=== falsethe file will be ignored by the widget.Use this to implement your own validators.
-
onBeforeUploadThe return value is now ignored. UseonNewFileinstead. onUploadErrorNew paramters xhr and status:(id, xhr, status, message)-
onFallbackMode- Parametermessagewas removed -
New callbacks
onUploadCompleteThis triggers right afteronUploadSuccessoronUploadError. In both cases.onUploadCanceledTriggers after a pending or uploading file is canceled (by using one of the API (README.md#methods))onDragEnteronDragLeaveonDocumentDragEnter-
onDocumentDragLeave -
Callbacks removed
onFilesMaxErrorFunctionality removed. Check the options cheanges for the reasons behind this change.
See callbacks section for details