x

PDFs no longer open in browser?

I just noticed yesterday that when I click on a "File," specifically one that I added to my site as a PDF, it now downloads to my computer instead of automatically opening in the browser as it used to since I can remember. This happens for all files on my site.  I am using Safari, but get similar results with FireFox and Chome. I made no changes to my browser. What changed with Weebly or the settings that I am missing? 

2,548 Views
Message 1 of 25
Report
24 REPLIES 24
Square

Thanks for posting, @bullockscience I'm not sure what happened to this issue as it is quite old and I haven't heard any updates about it since it first came out. Can you post a link to one of the pages so we can see the file name and behavior? 

355 Views
Message 25 of 25
Report

349 Views
Message 25 of 25
Report
Square

Thanks. I'm pretty positive when we brought this up initially, we were told it was a browser change and working as intended. But, it also looks like @Adam may have had an additional conversation with the QA team. I'll keep digging. 

Are all of your students using the same browser/device? I did confirm that Chrome on Mac device is downloading all files, even the ones without any special characters like a previous poster suggested. 

337 Views
Message 25 of 25
Report

Since I started using Weebly fairly recently, PDFs have never opened in the browser so I went looking for a solution (workaround) and found/developed this method using custom HTML.  (It looks like a lot of work but that’s because I spell things out carefully.  Also, half of the steps you only do once, regardless of how many PDF files your site includes.)

  1. Create an additional private, unlinked-to, non-searchable, member-only page on your production website.  This location will be used as a place where you will upload your PDF files.  You don’t care about the formatting or header or anything else.
  2. In the Weebly editor, go to the page you just created.  Put a File widget on the page.
  3. Upload your PDF file by clicking on the widget, upload, etc.  This creates an official reference to the file in the Weebly system.  A File widget, even on an unpublished page, seems to keep the file around and available. 
  4. Next you have to discover where Weebly is storing your files.  To do this, view your published website in your browser and go to a page where you have placed a graphic file.
  5. Right-click in some non-link area of the page and select View Page Source.  You should get a new tab or window displaying the HTML of your page.
  6. Search the HTML (Ctrl-f) for the name of your graphic file.  It should be part of the URL for the file in the Weebly system in a folder called uploads.  The URL will have the format “https://<YourSiteName>.weebly.com/uploads/<WeeblyAssignedDigit>/<WeeblyAssignedDigit>/<WeeblyAssignedDigit>/<WeeblyAssignedDigit>/<WeeblyAssignedNumber>/<Filename>.<Extension>”.  (Of course, everything between these <brackets> are values specific to your website.)
  7. Copy the URL and paste it into Notepad or someplace where you can keep it around and edit it for future use.  All of the files you upload into Weebly seem to be stored at this same location regardless of what page they are placed on and even which website they are placed on.
  8. Wherever you pasted the URL, change the filename to the name of your PDF file and the extension to “PDF”.
  9. Select and copy the entire URL.  Below, I will refer to this as <YourPDFUrl>.
  10. Return to the Weebly editor and go to the page where you want the PDF link to appear.  From the left side of the editor menu, drag an "Embed Code" element to the destination location and drop it in.
  11. Click on the Embed Code element.
  12. Click "edit custom HTML".
  13. Paste in the following code:  <a href="<YourPDFURL>">Whatever Text You Want The Link To Be</a>
  14. The result should look something like this:  <a href="https://mywebsite.weebly.com/uploads/4/3/8/9/87699321/myminutesfile.pdf">10/13/2020 Meeting Minutes</a>
  15. Publish the website.  You should have a one-click display of the PDF file.
175 Views
Message 26 of 25
Report