#include <dwc.h>
BOOL DWC_GHTTPPostAddFileFromMemory( DWCGHTTPPost *post,
const char *key,
const char *buffer,
int bufferlen,
const char *filename,
const char *contentType );
This function adds data to be uploaded to the HTTP server to a DWCGHTTPPost type object. A DWCGHTTPPost type object is an information unit used to upload data to the HTTP server. It is created by the DWC_GHTTPNewPost function.
Data is uploaded to the HTTP server as a file. Data is not copied during this call. Keep in mind that data will be loaded when actually starting upload.
Use the DWC_PostGHTTPData or DWC_GetGHTTPDataEx2 function to actually start data upload.
post |
Pointer to the DWCGHTTPPost type object to which data is added. |
key |
String to display the name of the data to be added. Neither NULL nor an empty string "" can be specified. |
buffer |
Pointer to the data to be uploaded as a file. |
bufferlen |
Number of bytes of data to be uploaded as a file. |
filename |
File name to be notified to the HTTP server. Neither NULL nor an empty string "" can be specified. |
contentType |
File's MIME type. "application/octet-stream" results if NULL. |
TRUE |
Data successfully added. |
FALSE |
Failed to add data due to a parameter error or a memory allocation error. |
DWC_GHTTPNewPost, DWC_PostGHTTPData, DWC_GetGHTTPDataEx2
2006/12/27 Initial version.
CONFIDENTIAL