-2

I don't have Drupal installed on my computer (do I have to?). I access the admin site to make changes. I need to add a PDF file that describes an event. In order to do this quickly, I simply inserted some text describing the event, and at some point in the test, I want a link that people will click and the pdf file opens up.

I am totally clueless as to what I'm doing wrong. I typed <a href= "/files/pdfdocname.pdf"> in front of the word I want linked. the link is active. However, it redirects to a page that says the page doesn't exist.

Is there another code I need to use? My document is found in the files folder of the root directory of the website.

2 Answers 2

1

This is more of a general web question as opposed to being specifically Drupal related.

To answer your first question, no, you do not need to have Drupal installed on your personal computer in order to make changes to an existing site.

Here are a few things to check:

  • The server could not locate your file. Double check your file path and URL to your PDF. If your PDF is located in the public directory (starting from your web site root) "sites/default/files", then the corresponding URL would be http://www.example.com/sites/default/files/mypdf.pdf If you type in your URL in your browser, it should load it up.

  • If you are sure that you have the correct URL, but the PDF will not load up, double check the permissions on that file. Here is a good post about permissions: What are the recommended directory permissions?

5
  • OK, tried what you wrote. Here is the phrase I want to link my pdf to: "Cliquez ici pour consulter la programmation complète de cette journée." the link is added to the "ici". That's where I added: Cliquez <a href="exploitationsexuelle.com/default/sites/files/…> pour consulter la programmation complète de cette journée. As you can see, when you click the link, it says that page cannot be displayed. I don't want to create a new page. I just want the pdf to pop-up. What am I doing wrong?
    – Melanie
    Jan 31, 2013 at 16:20
  • all is ok. thanks! I had inverted some text in my url... thanks for your help!
    – Melanie
    Jan 31, 2013 at 16:37
  • Great! Don't forget to tick the check mark next to my answer :)
    – Jukebox
    Jan 31, 2013 at 18:01
  • Maybe you can help me again! Would there be a reason why my link wouldn't work with a MAC but works fine with a PC? I'm totally able to open the file in a new page, but someone tested it with his MAC and all he got was a blank page?
    – Melanie
    Feb 1, 2013 at 3:32
  • Without more details / errors, I don't think I can accurately troubleshoot this. You could try clearing Drupal's cache, but that's all I can think of at the moment.
    – Jukebox
    Feb 1, 2013 at 20:13
0

First of all which Drupal version do you use?
In drupal 7 you have to enable "File" module (it's provided by drupal distr). Then go to content types (in Structure), add new content type or select on of exists. After saving content type see "manage fields". Add new field (fill label and field name), select Type of this = File, click Save. Then in extenstions fill pdf, and enter place of storing.
Then try create this content type, pdf file uploading will available and after saving you can see direct link to download it, if you don't see it, visit content type and check "Manage display" tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.