Indy HTTP server: multipart/form-data file upload example

The Internet Direct (Indy) 10 HTTP server class TIdHTTPServer does support HTTP file upload with multipart/form-data encoding. The solution below is based on code in the Indy and Delphi newsgroups. Please note that a patch in the Indy library is required, as shown on Stackoverflow in Indy MIME decoding of Multipart/Form-Data Requests returns trailing CR/LF.

Usage

If the demo server runs, open a web browser and navigate to the URL http://127.0.0.1:8080, there you will find the upload form

Neue Bitmap

Source

The full source code can be found here: Indy MIME decoding of Multipart/Form-Data Requests returns trailing CR/LF.

Advertisements

One thought on “Indy HTTP server: multipart/form-data file upload example

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s