Didier Posted June 5, 2020 Share Posted June 5, 2020 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 5, 2020 Share Posted June 5, 2020 4 minutes ago, Didier said: i want to upload the SAME file just after -> nothing happen Hi Didier, Can you try this approach? Quote Link to comment Share on other sites More sharing options...
Didier Posted June 5, 2020 Author Share Posted June 5, 2020 I tried this way, but i get another error. I use your sample. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 5, 2020 Share Posted June 5, 2020 1 hour ago, Didier said: I tried this way, but i get another error. File not uploading? Is this after inserting the script? Quote Link to comment Share on other sites More sharing options...
Didier Posted June 5, 2020 Author Share Posted June 5, 2020 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 Quote Link to comment Share on other sites More sharing options...
Didier Posted June 5, 2020 Author Share Posted June 5, 2020 It doesn't work event OnCompleted work event OnMultiCompleted don't work Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 5, 2020 Share Posted June 5, 2020 Ok, please do not use the code above, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2020 Share Posted June 6, 2020 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; 1 Quote Link to comment Share on other sites More sharing options...
Didier Posted June 7, 2020 Author Share Posted June 7, 2020 Hi, Yes it works 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 Quote Link to comment Share on other sites More sharing options...
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.