Jump to content

upload file buton fail on 2nd upload


Didier

Recommended Posts

Hi,

I want to upload a file with a TuniFileUploadButton
it works, but :
i want to upload the SAME file just after -> nothing happen

sample :

uploadfile1 -> ok
uploadfile1 -> nothing

but

uploadfile1 -> ok
uploadfile2 -> ok
uploadfile1 -> ok

My customers must upload the same files several times, they have an option for where to put it in their library.

All is good on firefox, the problem is only on Chrome

I use the version 1.90.0.1531

I test your sample : FMSoft\Framework\uniGUI\Demos\Desktop\FileUpload

-> same problem.

Another thing : when you pass the mouse over the button, the hint is the file which just have been uploaded ...

Thank you for help,

Didier

Link to comment
Share on other sites

19 hours ago, Didier said:

yes it's after inserting the script

The file is uploading but the progress bar stay the first time.

i click sur cancel and after all is good, upload works

Hi,

Can you try with this approach?

1. 

Ext.form.field.File.override(
{
    onChange: function() {
        this.fileInputEl.dom.value = '';
    }
});

2.

procedure TMainForm.UniFileUploadButton1Completed(Sender: TObject;
  AStream: TFileStream);
begin
  UniImage1.LoadFromStream(AStream);
  (Sender as TUniFileUploadButton).JSInterface.JSCode(#1'.fileInputEl.dom.value=null;');
end;

 

  • Like 1
Link to comment
Share on other sites

Hi,

Yes it works :D

But i must upload several files in the same time, so i must put your code in

 

procedure TMainForm.UniFileUploadButton1MultiCompleted(Sender: TObject;
  AStream: TFileStream);
begin
  (Sender as TUniFileUploadButton).JSInterface.JSCode(#1'.fileInputEl.dom.value=null;');
end;

Thank you

Link to comment
Share on other sites

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