You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by ichsan anam <ic...@gmail.com> on 2022/08/01 16:18:05 UTC

detect upload file completed and see the progress

Dear All, Please your help.

I am trying to upload image using apache royale 0.98.
Please take a look at my code here :

File  proxy definition
[image: image.png]

this is my function for uploading
[image: image.png]

[image: image.png]

event listener for upload complete and upload progress
[image: image.png]

*This two function not  fired*

the uploading function itself is working,  i can see my file successfully
uploaded to server.

But, the upload progress handler and the complete handler not fired and
never executed.
So i can't see the progress of uploading and i dont know wether uploading
is complete or not.

Thank you for your help.
Anam

RE: detect upload file completed and see the progress

Posted by Kessler CTR Mark J via users <us...@royale.apache.org>.
Note that might be helpful for status.

Comparing this to vanilla JS you can use the XMLHttpRequest "upload" property [1]. There is a progress event available that upload property that returns periodically a with the loaded amount and total. 


[1] https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/upload

-Mark K


RE: detect upload file completed and see the progress

Posted by Yishay Weiss <yi...@hotmail.com>.
Hi Ichsan,

It looks like the syntax is fine.

I can say that upload is working in an app I am working on (including complete event, though I am not 100% sure about progress).

I can suggest the following, in whatever order you see fit:


  1.  Try using the nightly build
  2.  Try using 0.9.9 (if for some reason you can’t do (a)
  3.  Try achieving the same thing using FileReference in the emulation layer [1].

If none of these work for you then I’ll try to dig into the code with you, it will however likely not happen soon as summer holidays are going to make me unavailable soon… Hopefully you’ll figure this out or somebody else can assist.

Hope this helps.

[1] Migrate from Flex (apache.github.io)<https://apache.github.io/royale-docs/migrate-an-existing-app/migrate-from-flex>

From: ichsan anam<ma...@gmail.com>
Sent: Monday, August 1, 2022 7:18 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: detect upload file completed and see the progress

Dear All, Please your help.

I am trying to upload image using apache royale 0.98.
Please take a look at my code here :

File  proxy definition
[cid:image005.png@01D8A9DD.0FA1D400]

this is my function for uploading
[cid:image006.png@01D8A9DD.0FA1D400]

[cid:image007.png@01D8A9DD.0FA1D400]

event listener for upload complete and upload progress
[cid:image008.png@01D8A9DD.0FA1D400]
This two function not  fired

the uploading function itself is working,  i can see my file successfully uploaded to server.

But, the upload progress handler and the complete handler not fired and never executed.
So i can't see the progress of uploading and i dont know wether uploading is complete or not.

Thank you for your help.
Anam