Jump to content

Uploading files - better through UniGuiServer or separate Server from VCL client?


elGringo

Recommended Posts

Hello, dear all. Looking for advice - maybe more for architecture of the app.

 

Need to upload many files from VCL client to Server Side. Already have decision for idHTTPServer.

 

Have 2 variants

 -upload directly to UniServer

 -upload to separate idHTTPServer

 

UniServer does main work, not concerned with file uploads. But file uploads also need to be for admins. What is better from the point of view of architecture?

 

On one hand - one server - simplicity, on another hand sustain - 2 Servers - each doing its job - more sustainable.

 

Looking for advice.

 

Thnx in advance. 

Link to comment
Share on other sites

  • 11 months later...

I am using intraWebs uploader function. I find it alot more stable and flexible, and multi fileupload with ease.

I hope one day that uniGui will expand its fileupload function, so I can convert many of my intrawebs projects.

 

For your question. I dont see a problem using the uniServer as it does threading. Admin uploads is just about controlling the login, right.

Link to comment
Share on other sites

Place IWFileUploader1 componemt on IWForm1

 

procedure TIWForm1.IWFileUploader1AsyncUploadCompleted(Sender: TObject;
  var DestPath, FileName: string; var SaveFile, Overwrite: Boolean);
var
  AlreadyDownloaded: Boolean;
begin
  AlreadyDownloaded := False;
  if not AlreadyDownloaded then
    IWFileUploader1.SaveToFile(FileName, 'c:\temp\'+FileName, True);

  // Inform IWFileUploader that we are taking care of file saving ourselves
  SaveFile := False;
end;

Run.

Drag and drop 1 or more files to the colored IWFileUploader1. Or just click it and select your files. and upload. 

When files is uploaded, you get status per file. Works even with very large files (>2GB).

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...