Brook 5, Multi-File Upload lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- RedOctober · 2021-10-18 15:58 Platform: Lazarus 2.0.10, FPC 3.2, Windows Server 2016, Brook 5 Framework 5.5.0.0 Goal: In a medical clinic setting, we have Medical Office Assistants (MOA) taking photos of patient wounds. They usually take about 6 photos using a tablet that is connected to our server via secure WiFi. I want the MOAs to be able to use the browser on their tablet, to connect to a Brook 5F based web app running on our server, and upload all the photo files using a single button to select the folder on the tablet where the photos are stored, then click a "Upload" (type=submit) button. I don't want the MOAs to have to use a "Select File" button for each individual photo they want to upload. What I have done so far: The Brook 5 Framework comes with a file upload example. The browser page includes two buttons to select two files. I am trying to modify the example to upload multiple files. I am posting here, in the hopes that someone can point out a simple, well-known FPC tweak in my code that wd make this possible, as opposed to me having to get a Brook 5F specialist (which are rare) to do a deep dive into modifying the Brook component. Problem: My mods don't work. No files are uploaded. I modified the example page, so that the "select file" button selects a directory, instead of a single file, like this: Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const PAGE_FORM = Concat( '', '
', '', '', '' ); The above page works. Here is the code that processes the incoming files, when the user clicks "Submit": (See the comment line) Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TfrmMainUpFiler.brk_svrRequest(ASender: TObject; ARequest: TBrookHTTPRequest; AResponse: TBrookHTTPResponse);var VUpload: TBrookHTTPUpload; VField: TBrookStringPair; VFile, VFileList, VUsersList, VError: string;begin if ARequest.IsUploading then begin VFileList := '