(CURL, PHP) Hochladen von Dateien mit PUT-Anforderung. Wie verarbeite ich das?
Das habe ich in process.php
parse_str(file_get_contents("php://input"),$upload_data);
if (isset($upload_data)) {
print_r($upload_data);
exit;
}
So frage ich den Server mit curl ab.
weldan@prindu:~$ curl -X PUT -H "X-TOKEN: test123" -F filedata=@/home/weldan/Pictures/Cool-Pictures1.jpg http://host.tld/process.php
Array
(
[------------------------------22031b6e799c
Content-Disposition:_form-data;_name] => "filedata"; filename="Cool-Pictures1.jpg"
Content-Type: image/jpeg
���
)
so dass, wie ich weiß, dort Datei hochgeladen wird.
Das aktuelle Problem ist, wie verarbeite ich diese Datei wie die Variable $ _FILES?
offen für andere Wege, um dies auch zu erreichen.
Vielen Dank