Search the Community
Showing results for tags 'delete()'.
Found 2 results
I have a file field named "resume". I want to delete the file saved in it using the API. The field is limited to only 1 upload of file and the return type is set to "Automatic" which means it will return a single object if a file is available. Now there are two options that I have tried- delete() and deleteAll(). $page_to_change = $pages->get("name=xyz"); $page_to_change->resume->deleteAll(); //OR //$page_to_change->resume->delete($page_to_change->resume); $page_to_change->of(false); $page_to_change->save(); Both of these give an error like- Error: Exception: Method Pagefile::deleteAll does not exist or is not callable in this context(...) I understand that this error is because these two functions work on a wirearray rather than on a file object. But how do I delete a single file?
Hello, when I delete a page with repeater fields, the fields data stays in the DB. Is there a way to delete these or a way to find out which data in the "pages" table is from repeaters? I added and deleted about 4000 pages via a script and now my "pages" table is a mess ... Thanks, thomas