我正在尝试在我的应用程序的后端实现yii2 PendalF89/yii2-filemanager,并在我的配置中使用以下内容:
'routes' => [
// Base absolute path to web directory
'baseUrl' => '',
// Base web directory url
'basePath' => '../',
// Path for uploaded files in web directory
'uploadPath' => 'uploads',
],
以上配置将文件上传到正确的目录,但是它们没有显示在文件管理器中,我认为这是由于缩略图URL是/ backend / uploads而不仅仅是/ uploads
上传图片后,我收到以下消息:
{"files":[{"url":"/uploads/2016/01/educationcentre.jpg","thumbnailUrl":"/backend/uploads/2016/01/educationcentre-128x128.jpg","name":"educationcentre.jpg","type":"image/jpeg","size":223742,"deleteUrl":"/backend/filemanager/file/delete?id=12","deleteType":"POST"}]}