Page 1 of 1

how to know progress while uploading files to appery files table

Posted: Mon Jun 12, 2017 1:52 am
by EJLD

Hello, when using the appery's API to upload files from the file input component, I'd like to add a progressbar.
can I get the progress of how much of the file has been uploaded real time ?
could you indicate me where to look for ?
thank you in advance,
Eric


how to know progress while uploading files to appery files table

Posted: Mon Jun 12, 2017 6:55 pm
by Galyna Abramovych

Hello Eric,

Unfortunately, we cannot provide you with any ready step-by-step example on how to add a progress bar but you can search the Internet for the solution. There are many.

For example, you can take a look at these links:
https://www.w3schools.com/howto/howto...
https://www.w3schools.com/bootstrap/b...
https://kimmobrunfeldt.github.io/prog...

Also, you might be interested in the following: https://github.com/clessg/progress-ba....
https://stackoverflow.com/questions/4...


how to know progress while uploading files to appery files table

Posted: Mon Jun 12, 2017 9:59 pm
by EJLD

Hello Galyna, thank you for your kind answer.
However, my questions were:
. how to know progress while uploading files to appery files table?
. can I get the progress of how much of the file has been uploaded real time ?

This is not about how to design a progressbar but how to know how much of the file has been uploaded out of the total data ?

this information will then be used to run the progressbar all through.

I cld find on the Internet some example of xhrhttp request ... but I m very happy using the Appery's API to upload file from the file input to the Appery's files collection. then, I d like to know how to retrieve the info about how of the file has been fetched.

cld you help me this question ?

thank you in advance,
Eric


how to know progress while uploading files to appery files table

Posted: Tue Jun 13, 2017 10:44 pm
by EJLD

Hi there! any advice???
thk you


how to know progress while uploading files to appery files table

Posted: Wed Jun 14, 2017 12:33 pm
by EJLD

any advice?


how to know progress while uploading files to appery files table

Posted: Wed Jun 14, 2017 12:56 pm
by Evgene Karachevtsev

Dear Eric,

Our developers are working on your issue at the moment, we'll get back to you with the update soon.


how to know progress while uploading files to appery files table

Posted: Wed Jun 14, 2017 7:29 pm
by Serhii Kulibaba

Hello Eric,

1) Please create a global variable "filesUploaded"
2) Set that variable = 0 before sending files to the database
3) Increment it on each file upload service event "success"
4) Check it with an amount of files you need to upload. If they are equal - all files were uploaded, else - you can get the percent value of uploading with a formula:
pre(uploaded / filesAmount) * 100/pre


how to know progress while uploading files to appery files table

Posted: Wed Jun 14, 2017 10:05 pm
by EJLD

Hello Evgene, Serhii, and others, I do appreciate your time on my question.
I understand Serhii's answer. However, it s not my question still. Reading my question again, it might not be clear enough. I must recognize.

What I want is not to have a progressbar that count the number of files uploaded (incrementing by one unit each time the success response is received) but
the quantity of bytes fetched up to the Appery's files table out of the total file's weight (progress% = bytesFetched / totalFileBytes).

I m using the Appery's API

uploadMultipleFilesHelper([picUpload_service], Apperyio(['photoInput']));

how can I get those 2 info bytesFetched and totalFileBytes ?

thank you for your time again
Eric


how to know progress while uploading files to appery files table

Posted: Thu Jun 15, 2017 4:38 pm
by Serhii Kulibaba

It is impossible to do with default Appery.io functionality. If it is critical issue for you - please use you custom XMLHttpRequest to Appery.io database: https://developer.mozilla.org/en/docs...

In that case you'll be able to control the progress with an event "progress" (see the link above for more information)


how to know progress while uploading files to appery files table

Posted: Thu Jun 15, 2017 10:40 pm
by EJLD

Hi Serhii, thank you for your answer. clear. I'll look at the link. good day, Eric