php - TYPO3 Powermail - upload form - file has to be overwritten if a file with same name already exists -


i using powermail extension create form upload of several file types. form located in login area. every logged in user there folder name created uploaded files stored.

# personal storage folder logged in user lib.userfolder = text lib.userfolder {   data = tsfe:fe_user|user|username   wrap = fileadmin/user_upload/|/   required = 1 }  # powermail file upload settings plugin.tx_powermail.settings.setup.misc.file { folder = fileadmin/user_upload/ size = {$plugin.tx_powermail.settings.misc.uploadsize} extension = {$plugin.tx_powermail.settings.misc.uploadfileextensions} randomizefilename = {$plugin.tx_powermail.settings.misc.randomizefilename} } 

this works fine far. problem if file name "example.pdf" exists , file named "example.pdf" uploaded file not overwritten. instead uploaded file "example.pdf" renamed "example_01.pdf". behaviour in general not fitting needs. need approach handle problem nice hints here.

to keep old files default behaviour in powermail. overwrite existing files not implemented.

possibilities: - building own uploader in finisher class (see https://docs.typo3.org/typo3cms/extensions/powermail/fordevelopers/addfinisherclasses/index.html) - overwriting existing uploader \in2code\powermail\domain\service\uploadservice e.g. xclass - clearing uploaded files every x hours (probably no option)


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -