attached_file Property

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

Syntax

def get_attached_file() -> str: ...
def set_attached_file(value: str) -> None: ...

attached_file = property(get_attached_file, set_attached_file)

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 post_data.

An HTTP 'Content-Length' header is also added to request. Its value is the cumulative length of the post_data 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.

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