CC-3975: Media Library: Try to download files from watched folder, the filename will be "true"
-fixed (originally scheduled for 2.2 - adding for 2.1.3)
This commit is contained in:
parent
4015949d2a
commit
bdaa64d4d1
|
@ -129,6 +129,9 @@ class ApiController extends Zend_Controller_Action
|
||||||
if(is_file($filepath)){
|
if(is_file($filepath)){
|
||||||
$full_path = $media->getPropelOrm()->getDbFilepath();
|
$full_path = $media->getPropelOrm()->getDbFilepath();
|
||||||
$file_base_name = strrchr($full_path, '/');
|
$file_base_name = strrchr($full_path, '/');
|
||||||
|
if (!$file_base_name) {
|
||||||
|
$file_base_name = $full_path;
|
||||||
|
}
|
||||||
$file_base_name = substr($file_base_name, 1);
|
$file_base_name = substr($file_base_name, 1);
|
||||||
// possibly use fileinfo module here in the future.
|
// possibly use fileinfo module here in the future.
|
||||||
// http://www.php.net/manual/en/book.fileinfo.php
|
// http://www.php.net/manual/en/book.fileinfo.php
|
||||||
|
|
Loading…
Reference in New Issue