jQuery-File-Upload更改用于上传和图像列表的目录

时间:2014-11-09 13:10:26

标签: javascript php jquery angularjs

我正在尝试更改jQuery文件上传中的上传路径和图像列表路径.... 我正在通过angularJS使用Jquery文件上传....这就是我现在所拥有的......

这是app.js中设置的网址

var url =  'server/php/index.php?myfolder=/content/media/gallery/1/';

这是jqueryFileUpload.js上的回调

submit: function (e, data) {
 var folder = '/content/media/gallery/1/';
    data.formData = {myfolder: folder}; 
 },

这是PHP

error_reporting(E_ALL | E_STRICT);
require('UploadHandler.php');
$myFolder = $_REQUEST['myfolder'];
$uploadFolder = '../../..'. $myFolder;
$uploadUrl = 'myUrl/mainfolder'. $myFolder;
$options = array(
    'upload_dir' => $uploadFolder,
    'upload_url' => $uploadUrl
);


$upload_handler = new UploadHandler($options);

我曾尝试更改UploadHandler.php中的路径,但它仍然在文件夹中上传文件 有人有一些想法???

谢谢...

0 个答案:

没有答案