Recent

Author Topic: Upload File from Client to Server  (Read 1109 times)

local-vision

  • New Member
  • *
  • Posts: 48
Upload File from Client to Server
« on: June 29, 2021, 11:46:20 pm »
Would greatly value any working example that anyone might provide on how to upload files from client (lazarus desktop application) to server (Apache).

Member GetMem provided an example a couple of years back in the following post:

https://forum.lazarus.freepascal.org/index.php/topic,44795.msg410118.html#msg410118

But I have not been able to get this to work. Despite many available examples I have not been able to get any to work. Most examples tend to presume implicit knowledge which makes comprehending/testing/debugging extra difficult. I have little to no expertise in server side development.

Here is the scenario:

I have an Apache server set up with a var/www/mydomain/

Within that I have a folder named: test/ to store the uploaded files from the client.

I have appended the hosts file to point to mydomain and tested it. So for instance http://mydomain/index.html works.

I would need some PHP script named for instance upload.php to handle the upload. The script can be placed in var/www/mydomain/upload.php

I would prefer to use fphttpclient or synapse.

Any ideas/examples? Questions, comments?

Would really appreciate the input.

Many thanks.

 

local-vision

  • New Member
  • *
  • Posts: 48
Re: Upload File from Client to Server
« Reply #1 on: June 30, 2021, 03:43:15 pm »
Solution now provided in the original thread:

https://forum.lazarus.freepascal.org/index.php/topic,44795.0.html

 

TinyPortal © 2005-2018