Andrew Niese asked 2017-12-04 21:51:22 UTC
We have a file resizing and uploading operation that takes 6 to 10 seconds to complete:
Application.Eval(“toastr.info(‘Uploading photos…hang tight.’);”) ‘Show toast notification
PhotoEngine.ResizeAndUploadImages(strImageTemporaryFileName, p) ‘Resize and upload files … takes 6 to 10 seconds
Application.Eval(“toastr.clear();”) ‘Fade out toast notification if still there.
Application.Eval(“toastr.success(‘Success, the photos are now live!’);”) ‘Show success toast notification
The first “Uploading photos…hang tight.” does not display at all… not sure why. Is there an equivalent of Application.ProcessMessages?
What’s the best way to return information on the status of the longer operation? Would it be a WebWorker? An occasional call to a WebMethod on the parent form to update the UI?
I tried passing in a reference to a WiseJ.Web.Control, and updating its text property throughout the operation, but that had no effect. Just had a small spinner going after a while.
thanks,
Andrew
Andrew Niese asked 2017-12-04 21:51:22 UTC
We have a file resizing and uploading operation that takes 6 to 10 seconds to complete:
Application.Eval(“toastr.info(‘Uploading photos…hang tight.’);”) ‘Show toast notification
PhotoEngine.ResizeAndUploadImages(strImageTemporaryFileName, p) ‘Resize and upload files … takes 6 to 10 seconds
Application.Eval(“toastr.clear();”) ‘Fade out toast notification if still there.
Application.Eval(“toastr.success(‘Success, the photos are now live!’);”) ‘Show success toast notification
The first “Uploading photos…hang tight.” does not display at all… not sure why. Is there an equivalent of Application.ProcessMessages?
What’s the best way to return information on the status of the longer operation? Would it be a WebWorker? An occasional call to a WebMethod on the parent form to update the UI?
I tried passing in a reference to a WiseJ.Web.Control, and updating its text property throughout the operation, but that had no effect. Just had a small spinner going after a while.
thanks,
Andrew