Reputation: 143
There are plugin solutions available, but I don't want to use them. What is the best way to display the progress of a file upload to Google Datastore ? Thanks.
Upvotes: 0
Views: 137
Reputation: 1994
I'm not sure whether you are referring to "how to display progress on the page" or to "how to know how much progress" on the server.
If the questions is related to how to display progress, check the <progress>
HTML5 element. With that and a little bit of JS/CSS you'll get an awesome progress bar.
If your are looking to know how much progress you have made uploading the file, Google doesn't provide a direct API for this, but you can still query your Datastore from time to time to know how much is left (at the time of upload, get the file size, then repeatedly consult the blob to compute what's the size).
Upvotes: 1