Jump to content

PDF file download


Recommended Posts

Hey guys, It's been a while since I posted. Anyway, I got an issue that I don't really understand here.I have a PDF file that users download from the intranet site. I used file://... and it opens for me. Online it also works for me. But it seems like other users cannot download it online. They say to change to http://.... instead. So I changed to http:// and I can't open it on the dev and live server.Got any idea what's wrong? Why can I open with file:// and others can't?FYI: the PDF file contains spaces and . to separate date digits in the name.
Link to post
Share on other sites
I know that and the PDF file is on the network where everyone should have access. Should it really be HTTP?

FTP could also do the work, but yes. Some kind of server.[edit=vchris] You mean the quote? Who do you think I got it from :) ? Yup, the one asking :) .[/edit][edit=justsomeguy]Well, we are talking about a PDF document, not a page, so if the user is suppose to view the file with standalone application (Adobe Acrobat Rader most probably), there's no harm in using FTP. I do agree that HTTP server is better of course.[/edit] Edited by boen_robot
Link to post
Share on other sites

Hmmm.... says page cannot be displayed with FTP:... BTW I do have access to that server.yo boen... where did you get your idea for your signature? :)

Link to post
Share on other sites

You don't want to access it with FTP, that will cause your browser to attempt to download the page (instead of displaying it), and you probably don't even want to use your browser's FTP client anyway.You need to refer to it via http. When you reference something with the file protocol (file://), the browser assumes that is a local path. You can write file://c:/test.txt to open c:/test.txt with the browser. So if you write a path with file://, then everyone better have access to the exact same path (no mapped network drives) as you do, or else their browser won't find the file.You need to put the document on a webserver, and make it accessible across the network and then refer to it with http.

Link to post
Share on other sites

It is on a webserver which everyone has read access. I tried http, ftp, file and only file worked for me and another user beside me but not for other users (not sure which one). The path should be the same for everyone since it is absolute.HTTP indicates page cannot be displayedFTP indicates page cannot be displayedFILE Opens the PDF fileThe path to the pdf file is correct.

Link to post
Share on other sites
HTTP indicates page cannot be displayedFTP indicates page cannot be displayed

And other files are displayed, right? I mean that such message is shown when the server is not running. If it was, you were going to see Error 404 (for HTTP server that is).
Link to post
Share on other sites

Well if the path is correct, and if the file is in a web-readable directory, then it should not return a 'not found' error. If it does, then either the path is wrong, you don't have the file in a web-readable directory (put it under wwwroot or /www), or both.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...