I have a pretty wide-spreaded question .... I don't understand how Upload Progress Module works , and it kind of doesn't work for me too , so ....
1) I have installed nginx with all the upload modules (nginx, nginx-extras) , and php-fpm
2)This is part of my nginx config for the project:
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /home/cha0s/learnphp$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
track_uploads proxied 1m;
}
location ~ ^/files/(.*)$ {
alias /home/cha0s/$1;
internal;
}
location ^~ /progress {
# report uploads tracked in the 'proxied' zone
report_uploads proxied;
}
3)I followed the tutorial at the bottom of this page: http://wiki.nginx.org/HttpUploadProgressModule :
So i have a form and upload progress bar:
<form id="upload" enctype="multipart/form-data" action="index.html" method="post">
<input name="file" type="file"/>
<input type="submit" value="Upload"/>
</form>
<div id="uploading">
<div id="progress" class="bar">
<div id="progressbar"> </div>
<div id="percents"></div>
</div>
</div>
JS code that triggers the jquery script:
<script type="text/javascript">
$(document).ready(function(){
$('form').uploadProgress({
/* scripts locations for safari */
jqueryPath: "/static/js/jquery.js",
uploadProgressPath: "/static/js/jquery.uploadProgress.js",
/* function called each time bar is updated */
uploading: function(upload) {$('#percents').html(upload.percents+'%');},
/* selector or element that will be updated */
progressBar: "#progressbar",
/* progress reports url */
progressUrl: "/progress",
/* how often will bar be updated */
interval: 2000
}
});
</script>
And that script : https://github.com/drogus/jquery-upload-progress/blob/master/jquery.uploadProgress.js
Questions and Problems:
1)First problem is that i always get returned ({ "state" : "starting" }); ...
2)Second question is : the reason i began trying to make this thing work , is because i wanted to write a php script , which would slice file into chunks and send them to the server , so i could upload huge files , and have a progress bar to monitor it. But i couldn't even find the smallest example or tutorial how to get it done with php and upload_progress_module or w/e.
And no , i don't want flash based uploaders.
So i guess , you already understood that i am a confused. So if you could explain how i can get this done, and help solve the problem with already existing configuration would be great