Skip to content

File data missing #9

@tomorrowevening

Description

@tomorrowevening
ofxHttpForm form;
form.action = "http://localhost:8888/upload.php";
form.addFormField("userID",  ofToString(userID));
form.addFile("file", "log.txt");
form.method = OFX_HTTP_POST;
http.addForm( form );
$user  = $_POST["userID"];
echo "User:  " . $user;
echo "\n";
echo "POST: " . count($_POST) . "\n";
echo print_r($_POST);
echo "\n\n";
echo "FILE: " . count($_FILE) . "\n";
echo print_r($_FILE);

Result:

User:  0
POST: 1
Array
(
    [userID] => 0
)
1

FILE: 0
1

POST variables get sent over, but why don't I see anything added through ofxHttpForm's::addFile()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions