File delete behavior not working

flashfs 13 May, 2021
I have the field file on start_page Views Editor. I have added on Behaviors > Data, the Delete behavior.
On my Actions Editor, on end_page, I have an email component.
The file is being uploaded to the server and sent by email, but it's not being deleted from the server.
GreyHead 14 May, 2021
Hi flashfs,

I can't find the Behaviors > Data Delete behavior, where exactly are you selecting that?

In the past I have handled deletion by having a Cron job on the site that runs one a day (or more) and deletes all files more that an hour or so old.

Bob
flashfs 14 May, 2021
I tried to upload here, but got the error "Error saving the attachment file.".
Here is a URL: https://imgur.com/a/nP9PCO9
GreyHead 14 May, 2021
Hi flashfs,

I have CFv7.0.7 installed but still can't find that setting - I think I am looking in the same place :-(

Bob
flashfs 14 May, 2021
Same version here. I think you are missing something. I can see there is a folder /administrator/components/com_chronoforms7/chronoforms/behaviors/views/field_delete/ and inside I can see a .php file with the description "Delete the uploaded file after processing".

Remember, I am inside the Views panel and added a File field. I say this because there is a Upload component on Actions panel, but I don't know how to use that.
flashfs 17 May, 2021
Answer
Ok, finally found what is needed. To the Delete behavior data inside field_file to work, it will be needed to go to the form settings and add the Delete Files behavior data, with the description "Auto Delete file fields with Delete Behavior".
Image here: https://imgur.com/a/VJapiVj
You need to login to be able to post a reply.