javascript - Access upload progress through http request in PHP -


is possible measure file upload progress accessing http request in php? , if how do while uploading file mysql db?

    require('../connect_db.php');     //gather required data        $name = $dbc->real_escape_string($_files['uploaded_file']       ['name']);        $data = $dbc->real_escape_string(file_get_contents($_files['uploaded_file']         ['tmp_name']));        $size = intval($_files['uploaded_file']['size']);        //create sql query        $query = "insert `".$user."`(               name,size,data,created               )               values (                '$name','$size','$data',now()                )"; 

for file upload client side progress suggest use jquery plugin-

http://runnable.com/uzkdayo3xew2aacx/how-to-upload-a-file-using-jquery-for-php

and don't think storing files in db, mysql idea.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -