#70012addFile should not delete the original file
Description
The ResourceStorage class has a method addFile from where it calls the driver classes addFile method. However the parameter $removeOriginal is not provided and passed.
public function addFile($localFilePath, Folder $targetFolder, $targetFileName = ‘’, $conflictMode = ‘changeName’) {
It should be like this:
public function addFile($localFilePath, Folder $targetFolder, $targetFileName = ‘’, $conflictMode = ‘changeName’, $removeOriginal = TRUE) {
interface DriverInterface:
- Adds a file from the local server hard disk to a given path in TYPO3s
- virtual file system. This assumes that the local file exists, so no
- further check is done here! After a successful the original file must
- not exist anymore.
*
param string $localFilePath (within PATH_site)
* param string $targetFolderIdentifier
param string $newFileName optional, if not given original name is used
* param boolean $removeOriginal if set the original file will be removed
- after successful operation
- @return string the identifier of the new file
public function addFile($localFilePath, $targetFolderIdentifier, $newFileName = ‘’, $removeOriginal = TRUE);
Reason:
During the development it is very helpful if the FAL added files are not removed from the computer harddisk. This can be done in a later stage.