EUpload Upload
Examples
Upload
Directory selection and request data
Photo wall, slots and manual queue
Upload
Properties
acceptstringAccepted file types, such as image/* or file extensions.
""actionstringHTTP(S) upload endpoint.
""autoUploadboolUpload automatically after selection; also configure action or a custom request.
falsebeforeRemovevarPre-removal guard; false blocks removal, with Promise support.
nullbeforeUploadvarPre-upload guard; false blocks uploading, with Promise support.
nulldatavarAdditional multipart form fields submitted with each file.
({})defaultDelegateComponentComponent slot for custom default upload area; null uses the default content. See this page’s examples for delegate context.
nulldirectoryboolAllow directory selection.
falsedragboolEnable a file drop selection area.
falseenabledboolAllow interaction; false disables the control.
truefieldNamestringMultipart file field name; name is a compatibility interface for fieldName.
"file"fileDelegateComponentComponent slot for custom file-list item; null uses the default content. See this page’s examples for delegate context.
nullfileListvarArray of selected files with file information and upload progress.
Fields:
url, name, size
status, error, percentage
[]headersvarUpload request header object.
({})heightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighthttpRequestvarCustom upload request receiving upload context and success, failure and progress callbacks.
nulllastErrorstringDescription of the most recent operation failure.
""limitintMaximum files.
0: unlimited
Positive number: limit
0listTypestringPresentation style of the selected file list.
"text" / "picture""picture-card"
"text"maxFileSizeintMaximum file size in bytes.
0: unlimited
Positive number: limit
0methodstringUpload request method, usually POST.
"POST"multipleboolAllow multiple selection.
truenamealiasMultipart file field name; name is a compatibility interface for fieldName.
Alias: control.fieldNamenameFiltersvarNative file-dialog filters, such as Images (*.png *.jpg).
Localized textpictureCardSizeintPicture-card size in pixels.
144showFileListboolDisplay the selected file list.
truetipDelegateComponentComponent slot for custom upload hint; null uses the default content. See this page’s examples for delegate context.
nulltriggerDelegateComponentComponent slot for custom upload trigger; null uses the default content. See this page’s examples for delegate context.
nullvisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthwithCredentialsboolCredential flag supplied to custom upload context; native networking is handled by Qt.
falseeffectiveLanguagestringRead onlyResolved language code in the current configuration scope.
Computed at runtimeuploadingboolRead onlyWhether any file is currently uploading.
Computed at runtimeSignals
removed(var file)Emitted after removing a file from the list; file is the removed file.
previewed(var file)Emitted when file preview is requested; file is the file to preview.
selected(var files)Emitted after selecting files; files contains the newly selected files.
rejected(string message)Emitted when files are rejected by the acceptance rules; message explains why.
changed(var file, var files)Emitted when a file status or the file list changes; file is the current file and files is the full list.
failed(var file, string message)Emitted when an upload fails; file is the failed file and message describes the error.
exceeded(var files, var fileList)Emitted when selection exceeds the file limit; files is the new selection and fileList is the existing list.
progress(var file, real percentage)Emitted on upload progress; file is the uploading file and percentage is its progress percentage.
succeeded(var file, string response)Emitted when an upload succeeds; file is the uploaded file and response is the server response.
Methods
handleStart(file)Add file to the pending upload list.
handleRemove(file)Remove file from the upload list.
open()Open the system file picker.
clearFiles(statuses)Clear the file list, optionally limiting removal to the given statuses.
submit()Upload the pending files in the list.
updateProgress(file, percentage)Update upload progress for file using percentage.
addDirectories(urls)Add files from the directories specified by urls to the upload list.
abort(file)Abort the upload task for file.
cancel()Cancel the current upload request.
removeFile(index)Remove the upload file at index.
addFiles(urls)Add the local files specified by urls to the upload list.
upload(index)Upload the file at index.