Timeline for How to add delete button to file field upload widget that actually deletes the file (not just association with content)?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 21, 2015 at 14:21 | comment | added | Geoff | it would only delete in this function if it's a temp file, otherwise it flags it for the calling function to deal with it properly. If your question edit regarding workbench is correct (which would make sense) it is obviously deciding to ignore the flag and keep the file under some circumstances | |
May 21, 2015 at 9:20 | comment | added | therobyouknow |
Updated question with note that the file_delete does not happen because the status is 1 (not zero).
|
|
May 21, 2015 at 8:15 | comment | added | therobyouknow |
I've updated my question with a screenshot of the debugger, showing that although the file_managed_file_submit($form, &$form_state) is called, the delete won't happen because an if-check on the status is not zero. I don't know what zero or non status means so any enlightenment on this would be welcome.
|
|
May 21, 2015 at 8:04 | comment | added | therobyouknow |
This does not happen for me but thanks for looking into it. I set a break point in my debugger on the file_delete line and it did not hit it. (After clicking the Remove button followed by the content Save button at the foot of the content) And looking at sites/default/files the file is still there.
|
|
May 21, 2015 at 3:24 | history | answered | Geoff | CC BY-SA 3.0 |