Skip to content

Commit b5d85cf

Browse files
authored
Return real uploaded file names.
Return real uploaded file names.
1 parent 09795fc commit b5d85cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/FilesUploadAndImageResize.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public function createDir(string $fileDestination, int $filePermission): string
148148
* ['bad-extension-files'] return all files with bad extension which is set by user
149149
* ['bad-extensions'] return only bad extensions which is set by user
150150
* ['uploaded-files'] return all uploaded files
151+
* ['real-uploaded-files'] return all uploaded real files name.
151152
* ['not-uploaded-files'] return all not move files into the destination folder [ Note: Folder (Dir) Permission issue ]
152153
*
153154
*/
@@ -193,6 +194,7 @@ public function uploadFiles(string $fileParamName, int $minImgWidth = 400, array
193194
}
194195
}
195196

197+
$this->param['real-uploaded-files'][] = $val; //All uploaded files with real name
196198
$this->param['uploaded-files'][] = $fileName; //All uploaded files name are move in this array
197199
$this->param['path-uploaded-files'][] = $filePath; //All uploaded files name are move in this array
198200
} else {
@@ -201,6 +203,7 @@ public function uploadFiles(string $fileParamName, int $minImgWidth = 400, array
201203
} else {
202204
// Upload all other files
203205
if (move_uploaded_file($_FILES[$fileParamName]['tmp_name'][$this->n], $filePath)) {
206+
$this->param['real-uploaded-files'][] = $val; //All uploaded files with real name
204207
$this->param['uploaded-files'][] = $fileName; //All uploaded files name are move in this array
205208
$this->param['path-uploaded-files'][] = $filePath; //All uploaded files name are move in this array
206209
} else {

0 commit comments

Comments
 (0)