Archived Forum Post

Index of archived forum posts


Problem with CkUploadW class not uploading at all

Jan 22 '16 at 10:35


I'm trying to perform the upload of a single file into the base directory of my web site; the code I'm using is very basic and looks like this:

CkUploadW upload;
upload.put_Expect100Continue (false);
upload.put_Login (L"myLogin");
upload.put_Password (L"myPassword");

//  Add one or more files to be uploaded.

bool success;
success = upload.BlockingUpload();
if (success != true)
    CkString    strErr;
    upload.LastErrorText (strErr);
    strErr.saveToFileW (L"c:\\log.txt", L"utf-8");
else {

    printf("Files uploaded!\n");

When running this code it will reach the line which states "Files uploaded!" but, on the server, the file will not be available at all. Could someone be so kind to explain what I'm missing or where I should look to for understanding the issue?

Kind Regards


Accepted Answer

The Server Side/PHP script is outside of Chilkat's scope. There are lots of PHP upload script examples out there if you search. For example:

In the above example, skip the Create the HTML form section - this is where the Chilkat example you originally posted does the work of the browser/HTML.


There has to be something on the server-side to receive the upload..

For example, see this:

The server-side code could be in any language -- C#, PHP, or whatever, but you must have some server-side code at the target URL to receive what is being sent and to decide what to do with it..


Thanks, now it's clearer. Any chance to have a PHP version of the server-side script?

Kind Regards

Severino Delaurenti