could you use last array entry to avoid something like "http://www.pdf.testhost.com/docs/doc1.pdf" or "http://localhost/files.pdf/files/doc1.pdf"?