[Pro] A folder with contents to be downloaded

Hi there

I wish to set up a folder on my site that club members can download with it’s contents via an emailed link is there a way to do this, I have tried the action "Upload extra resources " but it does not like folders.

Tom


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

You can Zip the folder and use the Link to File Action to allow the visitors to download that Zipped archive. URLs always point to a single file, never to a folder full of files. (Even in the case of http://example.com/products/widgets, the real URL is http://example.com/products/widgets/index.html and the server is silently filling that in for you.)

Walter

On Dec 27, 2012, at 10:44 AM, Tom Howes wrote:

Hi there

I wish to set up a folder on my site that club members can download with it’s contents via an emailed link is there a way to do this, I have tried the action "Upload extra resources " but it does not like folders.

Tom


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

Hi Walter

Thank you for your reply, I was just hoping that I could get away without the use of zip files as I think some of our members are to old to understand zipping 70/80.

Tom


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

You can expose a list of links to individual files, but you cannot expose a link to a folder without turning it into a single, serialized file (which is what Zip does with folders). I believe I just posted a recipe for this sort of thing, involving a simple PHP file on your server and an iframe on your page. Yup, here’s the Gist (containing the PHP file):

Save that to your server as a plain-text file named index.php, and put it in the same folder as the files you want to make available to your members. Make a new sub-folder for this purpose! So if you use an (S)FTP application to set this up, your site folder should look like this example:

/downloads
	file1.txt
	file2.txt
	file3.txt
	index.php
downloads.html
index.html
Resources
	...

Now, on your downloads.html page, you would use the iframe Action to add an iframe showing the directory listing. In the Action, set the URL to downloads/index.php. You can style this iframe to have a scroll bar, just like a finder file listing. Each file (except index.php) will show up in the listing as a separate line.

Clicking on a file in the list will cause that file to be loaded by the browser – and this is critical for you to think about and anticipate. Forcing the file to download is possible, but not universally. Some browsers really do believe they can open .DOC files, for example. Some actually can. But if you really truly want the person to download the file, rather than look at it in their browser, you will need to either make it a file format that their browser really can’t read (like Zip), or set the server to force a download, and that becomes an arms race with some versions of some browsers. (Safari doesn’t trust the server, and actually reads the first few K of the file before deciding what to do.)

Walter

On Dec 27, 2012, at 11:52 AM, Tom Howes wrote:

Hi Walter

Thank you for your reply, I was just hoping that I could get away without the use of zip files as I think some of our members are to old to understand zipping 70/80.

Tom


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 for that Walter, I will give it a try.

Tom


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

I remember an AJAX File Listing Action doing something like this, also an action from Mr. Davis as I recall? AjaxFileListing - ActionsForge


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

Richard,

Many thanks for your reply I will have a look at how it’s done latter today.

Tom


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