AttachedFile Property

A file to append to PostData if the POST or PUT methods are used.

Syntax

QString GetAttachedFile();
int SetAttachedFile(QString qsAttachedFile);

Default Value

""

Remarks

If this property contains a non-empty string, then if the HTTP 'POST' or 'PUT' methods are used (through the Post or Put methods), the contents of this property are appended to the HTTP request after any data in PostData.

An HTTP 'Content-Length' header is also added to request. Its value is the cumulative length of the PostData string and the file.

If data is being uploaded to a web service the WebUpload class is recommended as it will automatically encode file and form variables. Alternatively the MIME class may be used to construct the raw MIME entity which may be sent via this property.

This property is not available at design time.

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Qt Edition - Version 20.0 [Build 8307]