SetUploadStream Method

Sets the stream to be uploaded to the server.

Syntax

ANSI (Cross Platform)
int SetUploadStream(IPWorksStream* sUploadStream);

Unicode (Windows)
INT SetUploadStream(IPWorksStream* sUploadStream);
#define MID_HTTP_SETUPLOADSTREAM 14

IPWORKS_EXTERNAL int IPWORKS_CALL IPWorks_HTTP_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method sets the stream to be uploaded to the server. If an upload stream is set before the Post or Put method are called, the content of the stream will be read by the class and uploaded to the server. The stream should be open and normally set to position 0. The class will automatically close this stream if CloseStreamAfterTransfer is true (default). If the stream is closed, you will need to call SetUploadStream again before calling Post or Put again. The content of the stream will be read from the current position all the way to the end.

Note: SetUploadStream and LocalFile will reset the other.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

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