peacehunter Posted February 7, 2011 Share Posted February 7, 2011 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 More sharing options...
justsomeguy Posted February 7, 2011 Share Posted February 7, 2011 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.