@bytescale/upload-widget-vue
Advanced tools
Comparing version 4.4.0 to 4.4.1
{ | ||
"name": "@bytescale/upload-widget-vue", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)", | ||
@@ -5,0 +5,0 @@ "description": "Vue File Upload UI Widget โ Lightweight & supports: drag and drop, multiple uploads, image cropping, customization & more ๐ Comes with Cloud Storage ๐", |
@@ -135,3 +135,3 @@ <h1 align="center"> | ||
<UploadDropzone :options="options" | ||
:on-update="onFileUploaded" | ||
:on-update="onFilesUploaded" | ||
width="600px" | ||
@@ -143,3 +143,3 @@ height="375px" /> | ||
import { UploadDropzone } from "@bytescale/upload-widget-vue"; | ||
import type { UploadWidgetConfig, UploadWidgetResult } from "@bytescale/upload-widget"; | ||
import type { UploadWidgetConfig, UploadWidgetOnUpdateEvent } from "@bytescale/upload-widget"; | ||
@@ -164,7 +164,7 @@ // Full Configuration: | ||
methods: { | ||
onFileUploaded(files: UploadWidgetResult[]) { | ||
if (files.length === 0) { | ||
onFilesUploaded(event: UploadWidgetOnUpdateEvent) { | ||
if (event.uploadedFiles.length === 0) { | ||
alert("No files selected."); | ||
} else { | ||
alert(files.map(f => f.fileUrl).join("\n")); | ||
alert(event.uploadedFiles.map(f => f.fileUrl).join("\n")); | ||
} | ||
@@ -228,3 +228,6 @@ } | ||
}) => {}, // object to the method's first parameter. | ||
onUpdate: files => {}, // Called each time the list of uploaded files change. | ||
onUpdate: (event) => { // Called each time the Upload Widget's list of files change. | ||
// event.pendingFiles // Array of files that are either uploading or queued. | ||
// event.uploadedFiles // Array of files that have been uploaded and not removed. | ||
}, | ||
onPreUpload: async file => ({ | ||
@@ -231,0 +234,0 @@ errorMessage: "Uh oh!", // Displays this validation error to the user (if set). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47607
540