Linking to files in FW

Seems like a stupid question, because I guess the answer is obvious, but… how do I link a file in a Freeway page so that they will get uploaded with the rest of the site?
I guess what I’m asking is how do I get the hyperlink to refer to a local ‘internal’ address for the file rather than a particular url so that the file is accessible wherever the site is hosted.


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

Follow up question, how do I link to a file so that it downloads rather than opens in the browser?


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

You (the designer) don’t ordinarily get to make this decision for the end user. Browsers are designed to follow this path when linking to ANY content:

  1. Can I open it myself? (Then do so.)
  2. Do I have a plug-in for this content-type? (Then use it.)
  3. Do I have a registered “helper” application for this content-type? (Then hand it off.)
  4. Run out of ideas, or the file is explicitly marked as an undifferentiated binary data file? (Then download it.)

As you can see, download is the last resort, not an actual preferred solution. In order to shortcut the process so that the browser jumps all the way to number 4, a quick and dirty technique is to Zip the file, which means it has a content-type that the receiving browser cannot interpret. This forces a download.

To actually mark a file as download-only, even if the browser believes it can do something with it using 1-3 above, then you need to resort to server tricks. I’ve written about this extensively here, have a quick search in the Web interface for the string ‘ForceType’.

The real reason for this is that you do not control the browser with your content, it’s the other way around. The Web is about providing information, and letting the user interpret it as they will. This is the same reason why you don’t pop open a new window, or close an existing one (thankfully, the latter is mostly off-limits these days). It’s not YOUR browser.

Walter

On Feb 14, 2015, at 10:42 AM, Iain Mackenzie email@hidden wrote:

Follow up question, how do I link to a file so that it downloads rather than opens in the browser?


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

Thanks Walter.
Your advice is always appreciated. In fact, it is .doc files that I am using, and they seem to download as default, but your explanation is very interesting.
Any thoughts on my first post? Still struggling a bit on that.


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

There are a couple of built-in Actions that could help you here. In place of your regular hyperlink to the file, use either Link to File or Link to PDF (not sure what the difference between these is, actually, they’re both constructing a link to a file and uploading that file for you).

To use them to replace a text link, you place your flashing text cursor where the link text will appear, choose Insert / Action-item / Text Link to File[PDF] from the main menu, then click on the little inline Action-item that appears within the text and configure everything else (including the link text) within the Action interface. You choose the file you wish to link to there, and the file will be uploaded automatically and the link constructed like any other Freeway link – i.e. unbreakable, even if the file is updated or renamed.

There is a Graphic Link to File[PDF] variant, which may be used to construct “button” links if you prefer. Start with a drawn graphic box or imported (pass-through) graphic, and apply the Action to that. The rest of the configuration (minus the link text) is the same.

Walter

On Feb 14, 2015, at 1:00 PM, Iain Mackenzie email@hidden wrote:

Thanks Walter.
Your advice is always appreciated. In fact, it is .doc files that I am using, and they seem to download as default, but your explanation is very interesting.
Any thoughts on my first post? Still struggling a bit on that.


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

There are various actions that you can use ie Link to File, Link to PDF

These actions will upload the linked file alongside the rest of the FW generated files and provide the link on the FW page.

However I will suggest that you do NOT use .doc files as these can harbour Macro Viruses and should only be used between trusted sources. Certain companies etc will block .doc files in their systems.

.doc files will download as default because there are no normally configured web helper apps for them.

Unless you specifically need those .doc files to be user editable then you should output them as PDF

David


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

Thanks guys.
The client is insisting on have the doc and pdf versions up on their site despite my attempts to put them off.


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

The Link to File action is really useful, but is there a way to put files into a folder rather than just into ‘Resources’? Looks really messy with dozens of files sitting there.


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

No, and it’s a common complaint and bug report. Actually, I think there is a way, but it involves “crossing the streams” (to use the Ghostbusters parlance) by placing your files in the Site Folder on your Mac, and referencing them from there in the Action.

Steps to follow (and a hearty warning that this may not work as expected all the time):

  1. In your Mac’s Site Folder (as defined in the Document Setup dialog) make a new folder named downloads at the top level of the site folder (using Finder).
  2. In Freeway, use the gear menu at the bottom of the left pane to create a New Folder. Name it downloads as well.
  3. In the Finder, move your downloadable files into the Site Folder/downloads folder.
  4. Using the Link to File Action, select the files you moved in step 3 (one per Action instance, naturally).
  5. Publish and upload. The files will be copied into a new downloads folder on your server, and the links will look like this: <a href="downloads/billionaires_ballotbandits-palast.pdf">

Walter

On Feb 14, 2015, at 1:50 PM, Iain Mackenzie email@hidden wrote:

The Link to File action is really useful, but is there a way to put files into a folder rather than just into ‘Resources’? Looks really messy with dozens of files sitting there.


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

I’ll give that a go Walter.
Also, is there any way of avoiding this in the action

http://eyemack.co.uk/sg.jpg

where the text size is different for the 2 labels.


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

Sure. “wrap” the action by placing one space on either side of it in the run of text. Even if the Action is the first “character” in the text, this will not cause a space to appear at the beginning of the line. Then select all of the text at once, and apply your style to the sandwich of space-action-space to set the style.

Walter

On Feb 14, 2015, at 2:09 PM, Iain Mackenzie email@hidden wrote:

I’ll give that a go Walter.
Also, is there any way of avoiding this in the action

http://eyemack.co.uk/sg.jpg

where the text size is different for the 2 labels.


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