[Pro] upload PDF that displays and downloads

Is there a way (for the school secretary) to upload a pdf file to a folder on the server, that will display on a page (created in Freeway) and will be downloadable?

The way I set it up now is just a graphics box and it seems that changing the source file is not enough, the download file changes nicely, but the same file displayed does not change by just replacing the file.

http://stannsschool.ca/fridgenotes.html


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I did post a reply to this earlier but it has not appeared.

The short answer is - yes. Quite easily but only if the file name of the uploaded file remains the same.

When you place your graphic container on your page look in the inspector under the 3rd Tab (Graphic Item).

There is a Type dropdown selector. Choose URL from the options. Change Content to Image.

Now insert the full URL of the uploaded file ie

 http://www.yoursite.com/uploads/fridgenotes.pdf

Without the < and > at either end if you are looking at the web view of this.

Make sure your graphic container is the correct size.

In the same way your download link will also point to the same file

 http://www.yoursite.com/uploads/fridgenotes.pdf

When a new fridgenotes.pdf is uploaded it should be displayed online (barring browser caching issues)

There are other ways to do this for example by using a CMS if you want to change file names.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you use the Link to PDF Action to upload the file, then changing the PDF file (on your Mac) and uploading again within Freeway will upload the latest version of the PDF to the server.

If you want to set up something where you can tell the secretary to upload a file using an FTP application (maybe set up a special user using your cPanel that is “jailed” to just that one folder), and have your server automagically serve up the latest file, then you have a few choices. Among these, the simplest would be for you to make a manual link to the file (don’t use an Action at all). Use the Hyperlink dialog to create the URL exactly the way you want it to be, maybe make a folder with your FTP application called downloads (in the Web root folder) and place your files there. In Freeway, make your link by selecting some text, opening the Hyperlink dialog, and choosing the External tab. Enter a relative path to the file. If your Web page is in the site root (say that’s called htdocs, for instance) and your downloads folder is in that same folder, like this:

htdocs/
	downloads/
		pdf_number_one.pdf
		pdf_number_two.pdf
	file_listing_page.html
	index.html
	Resources/
		...

Then you would type into the URL field exactly this:

downloads/pdf_number_one.pdf

That’s a relative URL, starting with the spot in the filesystem where the HTML file containing the link lives, and navigating from that point to the file.

Once you have done this, then assuming you never name that file anything else, but upload a newer and different version of it directly to the downloads folder, then you never have to change the Freeway page again. The link will always work until you rename or delete that file from your server. Best of all, each time you upload in Freeway, you won’t have to suffer through the whole PDF file uploading again (which happens all too frequently, even when nothing about it has changed).

Another way to set this up (and this is quite a bit more work) would be to use the Ajax File Listing Action, found here: AjaxFileListing - ActionsForge

That will allow you to upload many files to a folder, and never have to create or touch the links in your Freeway page. Uploading another file to the folder will result in a new link automatically appearing on your Web page. So you could have something like newsletters or meeting minutes appear, one after another, without having to mess around in Freeway. As long as the files each have unique and descriptive names, they will just magically appear on your site.

Walter

On Mar 12, 2015, at 3:08 PM, Eva Grandell email@hidden wrote:

Is there a way (for the school secretary) to upload a pdf file to a folder on the server, that will display on a page (created in Freeway) and will be downloadable?

The way I set it up now is just a graphics box and it seems that changing the source file is not enough, the download file changes nicely, but the same file displayed does not change by just replacing the file.

http://stannsschool.ca/fridgenotes.html


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you so much David and Walter!
This is exactly what I was looking for!! I won’t be able to try it for a few days probably but I will let you know how it goes.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I am halfway there!!!
I tried both methods, David’s method seemed to work the easiest for me. The page displays the file perfectly, but the download box gives me a java script error if I leave it as an action (which I understand I shouldn’t). Not sure how to make it downloadable now. If I make another graphics item, how would it know to be a download item?
I call the folder “office” and the file “fridgenotes.pdf”

Walt, I couldn’t quite figure it out… the External tab dialogue box didn’t allow lines like your first green box showed, and the download url failed as well. Sorry when your solution probably works really well for someone who understands it better than I do.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

but the download box gives me a java script error if I leave it as an action

You simply select the graphic and create an external link to yoursite.com/office/fridgenotes.pdf and as long as the newly uploaded file is always called fridgenotes.pdf then it will just work.

The idea of using an action is only so that you do not have to upload the file seperately - so if you are uploading manually the action is NOT required.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

how would it know to be a download item?

As far as making it a download item goes - this will largely depend on your Browser. Most Browsers will display a pdf, to guarantee a download you could zip the file but you dont have that option unless the newly uploaded file is always going to be a zip.

There are server tricks to ensure a file downloads but for a simple pdf its not worth the hassle.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hey it works! It was simple, really. (must be trivial to you)
I uploaded and replaced a pdf to the folder on the server, and it works exactly like I wanted. Look! http://www.stannsschool.ca/pdftest.html
Thank you so much!

PS. we had a severe (freak) windstorm throughout the province (I’m in Barkerville BC) on Saturday and lost our power for 2 1/2 days! Backup batteries, and a wood cookstove saved us and -12C at night saved the food in the freezer. Power is nice though, but mustn’t be taken for granted. Stay prepared.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options