我正在为Blueimp Jquery文件上传插件编写自己的UploadHandler,我必须返回上传文件的url。但是,我的应用程序会上传到站点外的目录,以便在其他地方使用。
文档显示返回JASOn条目
{"files": [
{
"name": "picture1.jpg",
"size": 902604,
"url": "http:\/\/example.org\/files\/picture1.jpg",
"thumbnailUrl": "http:\/\/example.org\/files\/thumbnail\/picture1.jpg",
"deleteUrl": "http:\/\/example.org\/files\/picture1.jpg",
"deleteType": "DELETE"
},
{
"name": "picture2.jpg",
"size": 841946,
"url": "http:\/\/example.org\/files\/picture2.jpg",
"thumbnailUrl": "http:\/\/example.org\/files\/thumbnail\/picture2.jpg",
"deleteUrl": "http:\/\/example.org\/files\/picture2.jpg",
"deleteType": "DELETE"
}
]}
但是在我的情况下,URL不在网站内,它是根目录之外的目录。
我应该归还什么?这也适用于删除处理。
此致 皮特
答案 0 :(得分:0)
我已经决定最好将文件上传到网站中的目录,然后将其作为解决方法移到外部目录。
此致 皮特