SayeyeZohor Posted July 26, 2019 Posted July 26, 2019 hi @Sherzod i use UNIGUI 1506 and use new uniuploader with multiply upload How to check how many files uploaded is a few? Take a Sample to work with the new version of UNIGUI 1506 UniFileUpload1.Files[2].FileName Quote
Sherzod Posted July 26, 2019 Posted July 26, 2019 8 minutes ago, SayeyeZohor said: How to check how many files uploaded is a few? Hi, If I understand you correctly, on MultiCompleted event. High(Files)+1 Quote
SayeyeZohor Posted July 26, 2019 Author Posted July 26, 2019 18 minutes ago, Sherzod said: Hi, If I understand you correctly, on MultiCompleted event. High(Files)+1 procedure TUniOpinionRequestFrm.UniFileUpload1MultiCompleted(Sender: TObject; Files: TUniFileInfoArray); var I: Integer; begin for I := 0 to High(Files)+1 do Do you mean? Quote
Sherzod Posted July 26, 2019 Posted July 26, 2019 2 minutes ago, SayeyeZohor said: for I := 0 to High(Files)+1 do Do you mean? No, this is wrong Quote
SayeyeZohor Posted July 26, 2019 Author Posted July 26, 2019 14 minutes ago, Sherzod said: No, this is wrong ?????? Quote
SayeyeZohor Posted July 26, 2019 Author Posted July 26, 2019 55 minutes ago, Sherzod said: Please explain I want to get the number of uploaded files and rename the file and store it in a folder on the server and save it in the database. DestFolder:=UniServerModule.StartPath+'UploadFolder\'; DestName:=DestFolder+ExtractFileName(UniFileUpload1.FileName); UniLabel4.Caption:='File Name: '+UniFileUpload1.FileName; CopyFile(PChar(AStream.FileName), PChar(DestName), False); @Sherzod please help me ... Quote
Administrators Farshad Mohajeri Posted July 26, 2019 Administrators Posted July 26, 2019 for I := Low(Files) to High(Files) do begin // your code here end; TUniFileInfoArray = array of TUniFileInfoClass; TUniFileInfoClass = class public property Success: Boolean read FSuccess write SetSuccess; property CacheFile: string read FCacheFile write SetCacheFile; property FileName: TFileName read FFileName write SetFileName; property Stream: TFileStream read GetStream write SetStream; end; Quote
SayeyeZohor Posted July 26, 2019 Author Posted July 26, 2019 3 hours ago, Farshad Mohajeri said: for I := Low(Files) to High(Files) do begin // your code here end; TUniFileInfoArray = array of TUniFileInfoClass; TUniFileInfoClass = class public property Success: Boolean read FSuccess write SetSuccess; property CacheFile: string read FCacheFile write SetCacheFile; property FileName: TFileName read FFileName write SetFileName; property Stream: TFileStream read GetStream write SetStream; end; tnx but new bug I upload a file the first time and it's not a problem, but the problem starts when I upload two or more files, and next time I want to upload fewer files, this time high(files) has the previous value in memory and gives access voliation @Sherzod @Farshad Mohajeri Quote
Sherzod Posted July 26, 2019 Posted July 26, 2019 2 hours ago, SayeyeZohor said: I upload a file the first time and it's not a problem, but the problem starts when I upload two or more files, and next time I want to upload fewer files, this time high(files) has the previous value in memory and gives access voliation I opened a ticket in the support portal. Quote
Administrators Farshad Mohajeri Posted July 26, 2019 Administrators Posted July 26, 2019 Fixed. Try this for now: for I := Low(Files) to High(Files) do if Assigned(Files[I].Stream) then begin // your code end; 1 Quote
SayeyeZohor Posted July 26, 2019 Author Posted July 26, 2019 13 minutes ago, Farshad Mohajeri said: Fixed. Try this for now: for I := Low(Files) to High(Files) do if Assigned(Files[I].Stream) then begin // your code end; This isn't Solution, you will fix that in future version of UNIGUI? Quote
Administrators Farshad Mohajeri Posted July 26, 2019 Administrators Posted July 26, 2019 Yes. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.