Jump to content

Need help about making photo upload progress bar in javascript


peacehunter
 Share

Recommended Posts

I want to make a photo upload progress bar in javascript.But I dont know what is the basic idea of this. I have an idea but it may not be work. The idea isFirstly I will detect how much data is uploaded and what is the total size of that data. Then I will find the percentage of how much data is uploaded . After that I will make a progress bar based on that percentage. Then I will add the url of the photo in database using ajax and php.But the problem is that how can I detect total size , how much data is uploaded of the photo and the url of the uploaded photo in javascript???Plzzzzzzzz give me a suggestion about that problem or give me another suggestion on making upload progress bar in javascript.

Link to comment
Share on other sites

Javascript can't tell how big the file is or how much has been sent to the server. Only the server can determine that, when you upload the file the browser will send a header with the request which includes the size. Something on the server will need to determine how much has been uploaded and report the percentage. There are several methods you can use to get that information:http://www.google.com/search?client=opera&...channel=suggest

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...