View Single Post
  #7  
Old 07-02-2012, 02:18 AM
Bossa Bossa is offline
New Member
 
Join Date: May 2012
Posts: 7
Quote:
Originally Posted by NiteWave View Post
for

you add a few lines, e.g.,

then after upload, check if test.html exists, and verify its permission by
ls -l test.html
i did this
Code:
	$total_size = $ENV{CONTENT_LENGTH};
	my $str=qq[new Object({"state":"uploading", "size":"$total_size", "received":"0","files_done":"0"})];
  open(F,">$c->{htdocs_tmp_dir}/$sid.html");
  print F $str;
  close F;
  open(F,">$c->{htdocs_tmp_dir}/test.html");
  print F $str;
  close F; 
	my $mode = 0777; chmod $mode,"$c->{htdocs_tmp_dir}/$sid.html";
	$cg = CGI->new(\&hook);
and yes is create the test file and i found its create the status file now but it take a life time to create the file this why the progress bar not working
its create the file like 20 sec after start upload but the test create 1 sec after and the status file not update with the status he stay like he was ..

the upload is ..
Code:
	$total_size = $ENV{CONTENT_LENGTH};
	my $str=qq[new Object({"state":"uploading", "size":"$total_size", "received":"0","files_done":"0"})];
	open(F,">$c->{htdocs_tmp_dir}/$sid.html");
	print F $str;
	close F;
	my $mode = 0777; chmod $mode,"$c->{htdocs_tmp_dir}/$sid.html";
	$cg = CGI->new(\&hook);
the $str look like this
Code:
new Object({"state":"uploading", "size":"4618287", "received":"0","files_done":"0"})

Last edited by Bossa; 07-02-2012 at 02:21 AM..
Reply With Quote