Note that there are some explanatory texts on larger screens.

plurals
  1. POBlueimp jQuery File Upload Integrated with Database
    primarykey
    data
    text
    <p>This plugin reads image files on <strong>blueimproot/server/php/files</strong> on page load. I need to read records from database, and replace 'download' HTML structure with my custom structure. I want to show catalog products, which items are affected by uploading/removing images through this plugin.</p> <p>I've done this so far:</p> <ul> <li><p>I changed <code>public function get() { ... }</code> in <strong>blueimproot/server/php/upload.class.php</strong> to retrieve records from database. This function returns json object.</p> <pre><code>public function get() { /* default code of Blueimp $file_name = isset($_REQUEST['file']) ? basename(stripslashes($_REQUEST['file'])) : null; if ($file_name) { $info = $this-&gt;get_file_object($file_name); } else { $info = $this-&gt;get_file_objects(); } header('Content-type: application/json'); echo json_encode($info); */ include_once('../../../../connection.php'); $id_cat = $_REQUEST['catid']; $query = "SELECT id, name, price, img_path FROM products WHERE id_cat = $id_cat ORDER BY id"; $prods = mysql_query($query); $prod_arr = array(); while($prod = mysql_fetch_assoc($prods)) { $prod_arr[] = $prod; } header('Content-type: application/json'); echo json_encode($info); } </code></pre></li> <li><p>I found that function is called from <em>index.php</em> in <strong>blueimproot/server/php</strong>:</p> <pre><code>switch ($_SERVER['REQUEST_METHOD']) { ... case 'GET': $upload_handler-&gt;get(); break; ... </code></pre> <p>}</p></li> </ul> <p>I don't know where the returned json object is processed to show to UI. Have been 2 days and still can't track that function flow. Please help. Thanks.</p> <p>Original Online Demo: <a href="http://blueimp.github.com/jQuery-File-Upload/" rel="nofollow">http://blueimp.github.com/jQuery-File-Upload/</a></p> <p>Original Plugin Download: <a href="https://github.com/blueimp/jQuery-File-Upload/downloads" rel="nofollow">https://github.com/blueimp/jQuery-File-Upload/downloads</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload