vecino Well-Known Member Licensed User Longtime User Apr 25, 2024 #1 Hello, when sending a file, for example, via http you can specify a maximum timeout. B4X: Copy j.PostMultipart(cLink,mMap,llfiles) ' Upload the files and also giving the additional Values (m Map) to the uploadendpoint j.GetRequest.Timeout = globals.kiTimeOutWait ' <--- kiTimeOutWait = 10 s Wait For (j) JobDone(j As HttpJob) Is it possible to use something similar for SMB connections? B4X: Copy SMB.UploadFile(globals.cDirExchange,cNameFile, globals.cRutSMB,cNameFile) >>> SMB.Timeout = 10 <<< Wait For SMB_UploadCompleted(Url As String, RemoteFile As String, Success As Boolean) Thank you very much.
Hello, when sending a file, for example, via http you can specify a maximum timeout. B4X: Copy j.PostMultipart(cLink,mMap,llfiles) ' Upload the files and also giving the additional Values (m Map) to the uploadendpoint j.GetRequest.Timeout = globals.kiTimeOutWait ' <--- kiTimeOutWait = 10 s Wait For (j) JobDone(j As HttpJob) Is it possible to use something similar for SMB connections? B4X: Copy SMB.UploadFile(globals.cDirExchange,cNameFile, globals.cRutSMB,cNameFile) >>> SMB.Timeout = 10 <<< Wait For SMB_UploadCompleted(Url As String, RemoteFile As String, Success As Boolean) Thank you very much.
Erel B4X founder Staff member Licensed User Longtime User Apr 25, 2024 #2 There is no timeout setting. Upvote 0
josejad Expert Licensed User Longtime User Apr 25, 2024 #3 Erel said: There is no timeout setting Click to expand... Maybe this situation could be solved with your approach in this thread? [B4X][B4XLib] WaitForWithTimeout --> TimeoutHandler I have read many times the request for a "Wait For" with the addition of a timeout. This class is an attempt to implement that functionality. It is a B4X class, in the sense that it can be used with B4A, B4J and B4i; after all it uses only one B4XView which is completely optional and almost... www.b4x.com Upvote 0
Erel said: There is no timeout setting Click to expand... Maybe this situation could be solved with your approach in this thread? [B4X][B4XLib] WaitForWithTimeout --> TimeoutHandler I have read many times the request for a "Wait For" with the addition of a timeout. This class is an attempt to implement that functionality. It is a B4X class, in the sense that it can be used with B4A, B4J and B4i; after all it uses only one B4XView which is completely optional and almost... www.b4x.com
Erel B4X founder Staff member Licensed User Longtime User Apr 28, 2024 #4 True, with the limitation that the upload process won't be stopped. So the user might see an error message while the file was actually uploaded. Upvote 0
True, with the limitation that the upload process won't be stopped. So the user might see an error message while the file was actually uploaded.