how to know progress while uploading files to appery files table

This forum contains topics that were moved from Get Satisfaction
EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

how to know progress while uploading files to appery files table

Post 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

Galyna Abramovych
Site Admin
Posts: 68
Joined: Tue Mar 22, 2016 6:03 pm

how to know progress while uploading files to appery files table

Post 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...

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

how to know progress while uploading files to appery files table

Post 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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

how to know progress while uploading files to appery files table

Post by EJLD »

Hi there! any advice???
thk you

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

how to know progress while uploading files to appery files table

Post by EJLD »

any advice?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

how to know progress while uploading files to appery files table

Post 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.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

how to know progress while uploading files to appery files table

Post 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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

how to know progress while uploading files to appery files table

Post 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

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

how to know progress while uploading files to appery files table

Post 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)

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

how to know progress while uploading files to appery files table

Post by EJLD »

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

Post Reply