Recent

Author Topic: FPHTTPClient - how to send a flie from disk to server?  (Read 361 times)

Alexandr F

  • New member
  • *
  • Posts: 25
FPHTTPClient - how to send a flie from disk to server?
« on: March 25, 2019, 12:59:38 pm »
I want to send file from disk to server.

I try to use

TFPHttpClient.FileFormPost('localhost/upload.php?filename=aaa.bin','aaa.bin');

But php-script on server does not recognize any request parameters?

Any examples of POST request exist for TFPHTTPCLIENT?


GetMem

  • Hero Member
  • *****
  • Posts: 3452
Re: FPHTTPClient - how to send a flie from disk to server?
« Reply #1 on: March 25, 2019, 01:54:41 pm »
Please take a look at the attached project. Few notes:
1. Copy upload.php to your server
2. Create a folder(server side) named "test". For more details search for 'test/' inside upload.php
3. Don't forge to change the values inside bUploadClick procedure

Alexandr F

  • New member
  • *
  • Posts: 25
Re: FPHTTPClient - how to send a flie from disk to server?
« Reply #2 on: March 25, 2019, 02:46:48 pm »
GetMem,

Thank You very much!