When you upload files with the document module, and later try to download them, the server name from the time of the upload has been hardcoded into the download path. This means that if you rename your server, or if your server has several aliases and you access the site from these different aliases, the file will not be downloadable.
For example, if working on the server self when uploading a document, one ends up with a path similar to this:
http://localhost/sites/default/files/ao-1.pdf
This is stored in the table 'document' in the field 'url'. When attempting to download, the download URL: becomes the same, meaning it can not be downloaded from any other machine than localhost.
Comments
Comment #1
dee.gee CreditAttribution: dee.gee commentedI'm having the same issue, I used this module in development assuming that it was storing a RELATIVE URL.
.
Unfortunately, the URL that is saved alongside the document is ABSOLUTE and refers to the localhost on which the website was developed. Once the website was completed and moved to the final hosting environment, the URL for the document download was still pointing to the localhost.
Comment #2
mamta_kamboj CreditAttribution: mamta_kamboj at Imbibe Tech commented