Upload Files from Windows with Delphi

  • Thread starter Omid
  • Start date
In summary, the conversation discusses the possibility of uploading files from a Windows client to a server on the Internet using a utility written in Borland Delphi. The person asking the question initially did not know how to do this, but eventually found a solution through a link provided by others in the conversation. However, there is still a problem as the code downloaded requires the server to be running on the web server, which is not possible in their situation. They ask for other suggestions.
  • #1
Omid
182
0
Is it possible to upload files by a utility written in Borland delphi? I mean uploading files from a windows client to a server on the Internet.
 
Computer science news on Phys.org
  • #3
Oh no, ther's a little problem left unsolved.
The program I got from the links doesn't use HTTP normal web servers. In other words we must run the server.exe on the web server first, then connect to it. And because we have no direct access to the web server (and it isn't runnig Windows anymore) for executing such a server on it. The code I downloaded is useless for us. Any other suggestions?
 

1. How can I upload files from Windows using Delphi?

To upload files from Windows with Delphi, you can use the TOpenDialog component to allow the user to select the file they want to upload. Then, you can use the Indy TIdHTTP component to send the selected file to the desired server.

2. Can I upload multiple files at once using Delphi?

Yes, you can upload multiple files at once using Delphi. You can use the TOpenDialog component to allow the user to select multiple files, and then use a for loop to iterate through the selected files and use the Indy TIdHTTP component to upload each file to the server.

3. How do I handle errors during the file upload process?

You can handle errors during the file upload process by using the try..except block in your code. This will allow you to catch any exceptions that may occur during the upload and handle them accordingly, such as displaying an error message to the user.

4. Is there a size limit for the files that can be uploaded using Delphi?

The size limit for files that can be uploaded using Delphi depends on the server you are uploading to. Some servers may have a file size limit, while others may not. It is always best to check with the server's documentation or contact the server administrator to determine the file size limit.

5. Can I track the progress of the file upload using Delphi?

Yes, you can track the progress of the file upload using Delphi. The Indy TIdHTTP component has a OnWork event that can be used to track the transfer progress. You can use this event to update a progress bar or display the percentage of the upload completed to the user.

Similar threads

Replies
7
Views
233
  • Computing and Technology
Replies
7
Views
525
  • Computing and Technology
Replies
3
Views
2K
  • Computing and Technology
Replies
5
Views
1K
  • Computing and Technology
Replies
14
Views
2K
  • Computing and Technology
Replies
4
Views
2K
Replies
15
Views
968
  • Computing and Technology
Replies
2
Views
738
  • Feedback and Announcements
Replies
7
Views
988
  • Computing and Technology
Replies
3
Views
768
Back
Top