mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
create original file name from new document name when uploading document from the library folder.
This commit is contained in:
parent
04ce8ea28f
commit
e76df4c71f
|
@ -3,6 +3,8 @@
|
|||
--------------------------------------------------------------------------------
|
||||
- merge changes up to 5.1.27
|
||||
- fix triggering workflow (Closes: #542)
|
||||
- create original file name from new document name when uploading document
|
||||
from the library folder. Used to be the original file name
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 6.0.19
|
||||
|
|
|
@ -367,10 +367,15 @@ if($settings->_libraryFolder) {
|
|||
$docsource = 'library';
|
||||
$fullfile = tempnam(sys_get_temp_dir(), '');
|
||||
if(SeedDMS_Core_File::copyFile($dms->contentDir . $content->getPath(), $fullfile)) {
|
||||
if($_POST["name"]!="") {
|
||||
$oext = pathinfo($content->getOriginalFileName(), PATHINFO_EXTENSION);
|
||||
$origfilename = getFilenameByDocname(trim($_POST['name'])).".".$oext;
|
||||
} else
|
||||
$origfilename = $content->getOriginalFileName();
|
||||
$file_ary[] = array(
|
||||
'tmp_name' => $fullfile,
|
||||
'type' => $content->getMimeType(),
|
||||
'name' => $content->getOriginalFileName(),
|
||||
'name' => $origfilename,
|
||||
'size' => $content->getFileSize(),
|
||||
'error' => 0,
|
||||
'source' => 'library',
|
||||
|
|
Loading…
Reference in New Issue
Block a user