vchris Posted April 27, 2006 Share Posted April 27, 2006 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 comment Share on other sites More sharing options...
Little Goat Posted April 27, 2006 Share Posted April 27, 2006 when you do file:// it acceses your computer.other people do not have it on thier computer, so you have to find another way, such as network nieghborhood (on Windows), or a web host.LG Link to comment Share on other sites More sharing options...
vchris Posted April 27, 2006 Author Share Posted April 27, 2006 I know that and the PDF file is on the network where everyone should have access. Should it really be HTTP? Link to comment Share on other sites More sharing options...
boen_robot Posted April 27, 2006 Share Posted April 27, 2006 (edited) 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 April 27, 2006 by boen_robot Link to comment Share on other sites More sharing options...
vchris Posted April 27, 2006 Author Share Posted April 27, 2006 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 comment Share on other sites More sharing options...
justsomeguy Posted April 27, 2006 Share Posted April 27, 2006 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 comment Share on other sites More sharing options...
vchris Posted April 28, 2006 Author Share Posted April 28, 2006 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 comment Share on other sites More sharing options...
boen_robot Posted April 28, 2006 Share Posted April 28, 2006 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 comment Share on other sites More sharing options...
justsomeguy Posted April 28, 2006 Share Posted April 28, 2006 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 comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now