File "admin-products-upload.inc.php"

Full Path: /srv/www/www.cadoro.it/src/controllers/admin-products-upload.inc.php
File size: 453 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
  $files = _files('files', 'products');
  if ($files) {
    header("Content-Type: text/json; charset=UTF-8");
    $data = array();
    foreach ($files as $file) {
      array_push($data, array(
        "asset" => $file['asset'],
        "size" => filesize($file['path']),
        "name" => $file['name'],
        "md5" => $file['md5'],
      ));
    }
    echo json_encode($data);
  } else {
    header('HTTP/1.0 400 Bad Request', true, 400);
  }