Jump to content

Recommended Posts

Posted

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

image.png.fc301a8b4d44f7304a07c27a2d6aaebc.png

Posted
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

Posted
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?

Posted
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 ...

  • Administrators
Posted
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;

 

Posted
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

Posted
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.

Posted
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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...