| | |
| | | && ['image_upload', 'video_upload', 'document_upload'].includes(operation.type)) { |
| | | let uploadIds = []; |
| | | |
| | | console.log('upload operation complete', operation); |
| | | |
| | | if (operation.data) { |
| | | // Handle FormData |
| | | if (operation.data instanceof FormData) { |
| | |
| | | else { |
| | | uploadIds = operation.data['upload_ids'] || []; |
| | | } |
| | | |
| | | if (operation.data['field_name'] !== '' && operation.data['item_id']) { |
| | | this.notify('upload_complete', { |
| | | field: operation.data['field_name'], |
| | | item_id: operation['item_id'] |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // If not in data, check result (for completed operations from backend) |