Didier Posted August 9, 2019 Share Posted August 9, 2019 hello, I test multiupload. 1- when you upload 3 files -> ok then you upload 1 file without closing window -> it detect 3 files (2 are nil). Problem of initialisation i think but it is not important as i can test. 2 - you put a maximum size of a file (x). you add 4 files. the third has a size>x the component upload file1 and 2 and then put an error message and stop. Nothing is upload. so you put the 3 others which size is <x and then ... no windows, nothing seems happen. But in fact, if you wait a moment, files are uploading. Can you test before uploading, all the size files and then put a mess ? I must test cancel button but i think it the same. Thank you Didier Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 9, 2019 Share Posted August 9, 2019 Hello Didier, 16 minutes ago, Didier said: 1- when you upload 3 files -> ok then you upload 1 file without closing window -> it detect 3 files (2 are nil). Problem of initialisation i think but it is not important as i can test. Yes, it will be fixed. http://forums.unigui.com/index.php?/topic/12833-file-upload-multiply/&do=findComment&comment=68322 Quote Link to comment Share on other sites More sharing options...
Didier Posted August 12, 2019 Author Share Posted August 12, 2019 ok for this. But what about the 2 point ? Quote 2 - you put a maximum size of a file (x). you add 4 files. the third has a size>x the component upload file1 and 2 and then put an error message and stop. Nothing is upload. so you put the 3 others which size is <x and then ... no windows, nothing seems happen. But in fact, if you wait a moment, files are uploading. I test version 1508 and have the same problem. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 12, 2019 Share Posted August 12, 2019 Hello Didier, On 8/9/2019 at 2:29 PM, Didier said: 2 - you put a maximum size of a file (x). you add 4 files. the third has a size>x the component upload file1 and 2 and then put an error message and stop. Nothing is upload. so you put the 3 others which size is <x and then ... no windows, nothing seems happen. But in fact, if you wait a moment, files are uploading. Can you test before uploading, all the size files and then put a mess ? I must test cancel button but i think it the same. We will check. Quote Link to comment Share on other sites More sharing options...
Didier Posted August 12, 2019 Author Share Posted August 12, 2019 cancel buton is ok Quote Link to comment Share on other sites More sharing options...
Didier Posted August 20, 2019 Author Share Posted August 20, 2019 hello Sherzod, Did you check this ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 49 minutes ago, Didier said: Did you check this ? Hello Didier, Sorry not fully yet. I will check it today. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 4 hours ago, Didier said: Did you check this ? Didier, which build are you using? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2019 Share Posted August 20, 2019 31 minutes ago, Sherzod said: Didier, which build are you using? On 8/12/2019 at 5:48 PM, Didier said: I test version 1508 and have the same problem. Can you make a simple testcase for reproduce? Quote Link to comment Share on other sites More sharing options...
Didier Posted August 21, 2019 Author Share Posted August 21, 2019 Hi I've the version 1.90.0.1508 I take your sample C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\FileUpload\Upload.dproj I make just a litte changes maxAllowedSize : 104857600 Filter : none MultiFiles : True I comment all in procedure TMainForm.UniFileUpload1Completed(Sender: TObject; AStream: TFileStream); I add : procedure TMainForm.UniFileUpload1MultiCompleted(Sender: TObject; Files: TUniFileInfoArray); begin ShowMessage('all is ok'); end; For the code : nothing else and then i test like i said before : you add 4 files. the third has a size>maxAllowedSize the component upload file1 and 2 and then put an error message and stop. Nothing is upload. so you put the 3 others which size is <x and then ... no windows, nothing seems happen. But in fact, if you wait a moment, files are uploading. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2019 Share Posted August 21, 2019 4 minutes ago, Didier said: the component upload file1 and 2 and then put an error message and stop. Nothing is upload. so you put the 3 others which size is <x and then ... no windows, nothing seems happen. But in fact, if you wait a moment, files are uploading. Hi, I'm sorry that once again clarified. It seems I was not able to reproduce. I will check it again. Quote Link to comment Share on other sites More sharing options...
Didier Posted August 26, 2019 Author Share Posted August 26, 2019 Did you check ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 26, 2019 Share Posted August 26, 2019 46 minutes ago, Didier said: Did you check ? I couldn't reproduce your issue? Quote Link to comment Share on other sites More sharing options...
Didier Posted August 26, 2019 Author Share Posted August 26, 2019 Hi Sherzod, I take your sample : C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\FileUpload - Multiple make some changes Max allowed size is about 30 Mo. Not image files. Click On the right button : "Upload Button" Choose 2 files : first : 20 Mo second : 30 Mo important : The 20 Mo file MUST be uploaded before the 30Mo file. The first upload The second not with the advert message. And then all stop. This is ok. Now choose 1 file <30 Mo. The window with progress is not show. Nothing seems happen but the file is uploading. This is my problem. And then "OnMultiCompleted" event execute. But in fact, my customers will upload severals files. If the file 50 is > 30Mo, all the 49 files wich have been uploaded aren't really because the event "OnMultiCompleted" is not call. I just want, if it is possible, to have the advert message BEFORE the uploaded files began. Main.zip Quote Link to comment Share on other sites More sharing options...
Didier Posted August 26, 2019 Author Share Posted August 26, 2019 With .dpr is better Main.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 26, 2019 Share Posted August 26, 2019 Thanks Didier, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 28, 2019 Share Posted August 28, 2019 On 8/26/2019 at 7:33 PM, Didier said: I just want, if it is possible, to have the advert message BEFORE the uploaded files began. I'm analyzing... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 28, 2019 Share Posted August 28, 2019 On 8/26/2019 at 7:33 PM, Didier said: I just want, if it is possible, to have the advert message BEFORE the uploaded files began. Can you try this hasty workaround? procedure TMainForm.UniFormReady(Sender: TObject); begin UniFileUploadButton1.JSInterface.JSCode(#1+ '.fileInputEl.addBeforeListener("change", function(a, b) {'+ ' isValid = true;'+ ' for (i = 0; i < b.files.length; i++) {'+ ' if (b.files[i].size > '#1'.maxSize) {'+ ' isValid = false;'+ ' Ext.MessageBox.show({'+ ' title: "MaxSize = " + '#1'.maxSize,'+ ' msg: b.files[i].name + ": " + '#1'.maxSizeError,'+ ' icon: Ext.MessageBox.ERROR,'+ ' buttons: Ext.Msg.OK'+ ' });'+ ' return false'+ ' }'+ ' }'+ ' return isValid;'+ '});' ); end; Quote Link to comment Share on other sites More sharing options...
Didier Posted August 28, 2019 Author Share Posted August 28, 2019 it seems to work fine on Chrome but not on Firefox Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 28, 2019 Share Posted August 28, 2019 18 minutes ago, Didier said: it seems to work fine on Chrome but not on Firefox OK I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 28, 2019 Share Posted August 28, 2019 23 minutes ago, Didier said: it seems to work fine on Chrome but not on Firefox What is the problem? Seems works for me in FF too. Quote Link to comment Share on other sites More sharing options...
Didier Posted August 29, 2019 Author Share Posted August 29, 2019 Hi Sherzod, my bad, it seems to work fine too. My FF cache. But i've now another problem : i put the limit to 300Mo. TimeoutMS : 0 TimeoutSecs : 0 I upload 4 files : 20Mo-20Mo-64Mo-178Mo On the third i've a timeout error message at 98%. It seems timout is about 30 sec for all the uploads. But in fact, uploading files can take several minutes. But all is working fine. I was thinking the timeout property was for 1 httprequest. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 29, 2019 Share Posted August 29, 2019 Hi Didier, 59 minutes ago, Didier said: On the third i've a timeout error message at 98%. It seems timout is about 30 sec for all the uploads. But in fact, uploading files can take several minutes. But all is working fine. I was thinking the timeout property was for 1 httprequest. Ok we will check this. 59 minutes ago, Didier said: TimeoutMS : 0 TimeoutSecs : 0 Maybe at the moment you will set the value manually !? Quote Link to comment Share on other sites More sharing options...
Didier Posted August 29, 2019 Author Share Posted August 29, 2019 yes of course. But in this case, timeout will not be used anymore :(. Quote Link to comment Share on other sites More sharing options...
Point Posted March 18, 2023 Share Posted March 18, 2023 On 8/28/2019 at 7:56 PM, Sherzod said: Can you try this hasty workaround? procedure TMainForm.UniFormReady(Sender: TObject); begin UniFileUploadButton1.JSInterface.JSCode(#1+ '.fileInputEl.addBeforeListener("change", function(a, b) {'+ ' isValid = true;'+ ' for (i = 0; i < b.files.length; i++) {'+ ' if (b.files[i].size > '#1'.maxSize) {'+ ' isValid = false;'+ ' Ext.MessageBox.show({'+ ' title: "MaxSize = " + '#1'.maxSize,'+ ' msg: b.files[i].name + ": " + '#1'.maxSizeError,'+ ' icon: Ext.MessageBox.ERROR,'+ ' buttons: Ext.Msg.OK'+ ' });'+ ' return false'+ ' }'+ ' }'+ ' return isValid;'+ '});' ); end; how to implement this code on UnimFileUploadButton (mobile)?. on mobile version it doesn't have maxallowsize property 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.