Jump to content

Luciano Veneziano

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Luciano Veneziano

  • Birthday 02/02/1958

Technical Information

  • Delphi-Version
    Delphi Community Edition
  1. Luciano Veneziano

    Upload files from Delphi to PHP

    Funziona perfettamente: function httpsUpload(URL : string; fname : String ) : String; var LRequest: THTTPClient; LFormData: TMultipartFormData; LResponse: TStringStream; begin LRequest := THTTPClient.Create; LFormData := TMultipartFormData.Create(); LResponse := TStringStream.Create; try LFormData.AddField('json', '{"id":1,"user":"Luciano"}'); //optional LFormData.AddFile('file', fname); LRequest.Post(URL, LFormData, LResponse); Result := LResponse.DataString; finally LFormData.Free; LResponse.Free; LRequest.Free; end; end; phpfile <?php include_once("local/setup.php"); $where = $_FILES["file"]["name"]; if(move_uploaded_file($_FILES["file"]["tmp_name"], $where)) { echo "OK\r\n"; } else { echo "ERR\r\n"; } print_r($_FILES); ?>
  2. Luciano Veneziano

    Upload files from Delphi to PHP

    Hi everyone I have a PHP file that uploads images to me. I should send with HTTPS and post the parameters from Delphi like this. <form action = "UPLOAD.PHP" enctype = "multipart / form-data"> <input type = "file" name = "upfile" required /> <input type = "submit" value = "Upload" /> </form> Unfortunately I'm not very good, I was able to make calls in https and post, but I could not set up idHTTP correctly Has anyone already encountered this problem? Thanks to all.
  3. Luciano Veneziano

    Wrong version required at runtime

    Hello everyone. I have installed P4D without problems, When I compile an example everything is fine but when I launch it it asks me for a different version of the python dll. Where can I change the version in Python components? Thank you all
×