Hi guys,

I successfully used filefield to upload PDF documents into my page content.

Using views, I list the pages with pdfs so that when the page titles are clicked on, the browser opens a new tab opens the pdf document.

The problem is when I remove an existing pdf document and upload an updated version, drupal appends a zero to the url.

So, if originally I had "http://www.mysite.com/site/default/files/docs/pdf1.pdf"
once I upload a fresh version inplace of the existing one, the url changes to
"http://www.mysite.com/site/default/files/docs/pdf1_0.pdf"

This name alteration breaks the link and the document is not found.

Can some advice on how I might fix this issue ?

Thank you all very much.

Comments

mas160’s picture

At my experience, when you remove an attachment from node you have to save the node in order to delete the attachment from file system, otherwise a new version of the file is loaded, appending a _n to the name in DB (as by your case), then edit the node again to attach the new file.
Try this way and report the result.

sisko’s picture

Worked perfectly just as you said.

Thanks very much