Jump to content

TUniFileUpload->OnComplete: Cann't delete file


mhmda

Recommended Posts

Hi there,

I check the file type and in some cases I need to delete the copied file but it uses by the unigui app.

mFileUpload.TargetFolder :=  ServerModule.StartPath+'compsdata\';
.....
procedure TfrmAttachFiles.mFileUploadCompleted(Sender: TObject;
....
DestName:=ExtractFileName(AStream.FileName);
CopyFile(PChar(AStream.FileName), PChar(DestName), False);
....
deletefile(ServerModule.StartPath+'compsdata\'+DestName);//file is used by other process (unigui app in this case)

 

Any idea? 

Link to comment
Share on other sites

  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...