Class: QgsFileUploader¶
A utility class for uploading files.
To use this class, it is necessary to pass the URL and a the file name of the file to upload as arguments to the constructor, the upload will start immediately.
The upload is asynchronous.
The object will destroy itself when the request completes, errors or is canceled. An optional authentication configuration can be specified.
Added in version 4.2.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Methods
Call to abort the upload and delete this object after the cancellation has been processed. |
|
Called to start the upload |
Signals
Emitted when the upload was canceled by the user. |
|
Emitted when the upload has completed successfully |
|
Emitted when an error makes the upload fail |
|
Emitted always when the uploader exits |
|
Emitted when data are ready to be processed |
- class qgis.core.QgsFileUploader[source]¶
Bases:
QObject- __init__(uploadFileName: str | None, url: QUrl, formName: str | None = '', authcfg: str | None = '', delayStart: bool = True)
QgsFileUploader
- Parameters:
uploadFileName (Optional[str]) – file name of the file to upload to the server
url (QUrl) – the upload URL
formName (Optional[str] = '') – the upload URL
authcfg (Optional[str] = '') – optionally apply this authentication configuration
delayStart (bool = True) – if
True, the download will not be commenced immediately and must be triggered by a later call tostartUpload(). This can be useful to setup connections
- cancelUpload(self)[source]¶
Call to abort the upload and delete this object after the cancellation has been processed.
See also
- signal uploadCompleted(url: QUrl)[source]¶
Emitted when the upload has completed successfully
- Parameters:
url (QUrl)