File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,12 @@ $(() => {
120120 width: " 600px" ,
121121 height: " 375px"
122122 },
123- onUpdate : files => {
124- if (files .length === 0 ) {
123+ onUpdate : ({ uploadedFiles }) => {
124+ if (uploadedFiles .length === 0 ) {
125125 console .log (' No files selected.' )
126126 } else {
127127 console .log (' Files uploaded:' );
128- console .log (files .map (f => f .fileUrl ));
128+ console .log (uploadedFiles .map (f => f .fileUrl ));
129129 }
130130 }
131131 });
@@ -183,7 +183,10 @@ const options = {
183183 reset, // Resets the widget when called.
184184 updateConfig // Updates the widget's config by passing a new config
185185 }) => {}, // object to the method's first parameter.
186- onUpdate : files => {}, // Called each time the list of uploaded files change.
186+ onUpdate : (event ) => { // Called each time the Upload Widget's list of files change.
187+ // event.pendingFiles // Array of files that are either uploading or queued.
188+ // event.uploadedFiles // Array of files that have been uploaded and not removed.
189+ },
187190 onPreUpload: async file => ({
188191 errorMessage: " Uh oh!" , // Displays this validation error to the user (if set).
189192 transformedFile: file // Uploads 'transformedFile' instead of 'file' (if set).
You can’t perform that action at this time.
0 commit comments