int qCgiResponseDownload ( Q_ENTRY request,
const char *  filepath,
const char *  mimetype 
)

Force to send(download) file to client in accordance with given mime type.

Parameters:
request a pointer of request structure
filepath file to send
mimetype mimetype. NULL can be used for "application/octet-stream" mimetype.
Returns:
the number of bytes sent. otherwise(file not found) returns -1.
Note:
Do not call qCgiResponseGetContentType() before. The results of this function are the same as those acquired when the corresponding files are directly linked to the Web. But this is especially useful in preprocessing files to be downloaded only with user certification and in enabling downloading those files, which cannot be opend on the Web, only through specific programs.

Definition at line 224 of file qCgiResponse.c.


Generated on Mon Mar 26 07:00:51 2018 for JSOC_Documentation by  doxygen 1.5.7.1