AttachedFile Property

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

Syntax

ANSI (Cross Platform)
char* GetAttachedFile();
wchar_t* GetAttachedFile_W(); // Windows only
int SetAttachedFile(const char* lpszAttachedFile);
int SetAttachedFile(const wchar_t* lpszAttachedFile); // Windows only Unicode (Windows) LPWSTR GetAttachedFile();
INT SetAttachedFile(LPCWSTR lpszAttachedFile);
@property (nonatomic,readwrite,assign,getter=attachedFile,setter=setAttachedFile:) NSString* attachedFile;
- (NSString*)attachedFile;
- (void)setAttachedFile:(NSString*)newAttachedFile;
#define PID_HTTP_ATTACHEDFILE 3

IPWORKS_EXTERNAL void* IPWORKS_CALL IPWorks_HTTP_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_HTTP_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

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 C++ Edition - Version 20.0 [Build 8307]