4

if i remove the files that were uploaded in a File field,and then upload a same name file, the file removed just now is still present in the server and the new uploaded file gets renamed to a name with index ,say, xxx_0 ,xxx_1.

What I want to do is when I remove a file, it should be deleted from the server, to save space in the server, How can I do this?

2

I also crossed this issue. I just did these following steps.

  1. edit the node, and delete the file from the field (dont upload now) and save it.
  2. then edit the node, now upload the file (with same name) and save it.

Its worked for me. without xxx_0 like that.

Thanks

  • This is correct. When a node is saved the file is not deleted until the node form is saved. If the node form has not yet been saved, the file is deleted at once. – enzipher Mar 5 '13 at 6:24
  • 2
    I seems unavailable for me. I edited the node remove the file and save it,then I uploaded the files again save it. But it doesn't work.By the way I use D7. What am I wrong? another Q is if it works what if the field is a required field? @sadeesh kumar – googlg Mar 13 '13 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.