[Pro] Creating a downloads section via forms

I’m investigating the different ways to create a small downloads section on a page. As I consider the options, it seems to me that one of the ideal ways to create the section would be listing all the files available to download and adding a checkbox next to each. The users would then select all the files he or she would like to download, hit the “Download” button, and the selected files would come down the pipe.

This sounds like form territory to me, but I haven’t found any info on how to set something like this up in Freeway. Is what I’m describing feasible? Thanks.


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

It’s slightly more complex than that. A server can only send a single file per request as a download, so you would also have to Zip the requested files together on the server and send that zip down. It will require a form and a server-side application to interpret the request and create the zip.

I’ve built one of these before, as part of a huge document management system. Time to build is largely dependent on how complicated you need it to be. If you’re browsing one folder, choosing files from within it, and downloading them all in one whack, then it’s not that hard. In my case, there was what amounted to a “shopping cart” for files, people could search, browse, and add and remove files from their cart before deciding to download. That took weeks, cost tens of thousands for the client.

Walter

On Dec 21, 2012, at 12:31 PM, derekzinger wrote:

I’m investigating the different ways to create a small downloads section on a page. As I consider the options, it seems to me that one of the ideal ways to create the section would be listing all the files available to download and adding a checkbox next to each. The users would then select all the files he or she would like to download, hit the “Download” button, and the selected files would come down the pipe.

This sounds like form territory to me, but I haven’t found any info on how to set something like this up in Freeway. Is what I’m describing feasible? Thanks.


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 for the info, Walt. It does entail simply browsing one folder, but I’m not sure I want to get involved with tinkering on the server-side. I think I’ll look for a simpler way. Thanks again!

Regards
Derek


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

You could just link to the files, and let people download them. Simplest all around, right? Use the Link to File Action built in to Freeway.

Walter

On Dec 21, 2012, at 1:49 PM, derekzinger wrote:

Thanks for the info, Walt. It does entail simply browsing one folder, but I’m not sure I want to get involved with tinkering on the server-side. I think I’ll look for a simpler way. Thanks again!

Regards
Derek


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

Absolutely, but if there are a large-ish number of files, it would be nice to select the ones you like then and hit one download button. It’s not essential by any means, but I do think it’s a nice little touch, IF it could be done fairly simply. The procedure you described sounds like more cost than benefit in my case, so I’ll do it the old-fashioned way. No big deal. :slight_smile:


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

To avoid the many issues with uploading large files with Freeway, consider this approach. Make a folder on your server inside the web root. Call it downloads or something like that. Inside this folder, place this file:

Then upload all of your download-able files into that same directory. To integrate it into your Freeway page, use the iframe Action to create an iframe on your page. Make the URL of the iframe read downloads/index.php or similar. Preview from your server (this won’t work at all locally). You will see a list of all the files in that folder, except for the index.php file or any file that begins with a dot (hidden files, like .htaccess).

Anyone clicking on one of those links will download the file through their browser.

The zip thing would be nice, I agree, but it’s a bit of work to get going. You can’t have a single click download all of the files otherwise.

Walter

On Dec 21, 2012, at 1:58 PM, derekzinger wrote:

Absolutely, but if there are a large-ish number of files, it would be nice to select the ones you like then and hit one download button. It’s not essential by any means, but I do think it’s a nice little touch, IF it could be done fairly simply. The procedure you described sounds like more cost than benefit in my case, so I’ll do it the old-fashioned way. No big deal. :slight_smile:


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

Actually, you can, but it’s going to be a really seriously non-standard behavior. Watch what happens here:

http://scripty.walterdavisstudio.com/multifile

Click on one of those links, and an x appears after it to mark it chosen. Click “Get Files” and a separate little browser window opens for each chosen file.

Part one of the weird is that – lots of little windows opening for your chosen files.

Part two is that you leave it entirely up to the browser what to do with those files. I cheated and made four empty zip files since I know that browsers ALWAYS download those, they don’t try to show them to you. But if you had links to JPEGs or plain text files, or even .DOC files on Windows, those might appear in the little windows as visible content, and your users will need to know how to use File / Save as… to save them somewhere. Non-standard behavior is the root of all service calls.

Walter

On Dec 21, 2012, at 2:38 PM, Walter Lee Davis wrote:

You can’t have a single click download all of the files otherwise.


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

Very interesting Walter

I have tried this and it works fine and lists my files alphabetically.

However capitalised file names are listed before lowercase ie ABC, DEF, GHI, abc, def, ghi

I am assuming it would be a simple code tweak for it to ignore case.

David


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

That’s normal Unix alphabetization at work there. You can try this:

$files = scandir(dirname(__FILE__));
sort($files, SORT_NATURAL);
foreach($files as $file){
...etc...

That will give you a more Mac-like sort.

Walter

On Dec 21, 2012, at 4:51 PM, DeltaDave wrote:

Very interesting Walter

I have tried this and it works fine and lists my files alphabetically.

However capitalised file names are listed before lowercase ie ABC, DEF, GHI, abc, def, ghi

I am assuming it would be a simple code tweak for it to ignore case.

David


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 Walt

Wow. Thanks for those ideas. I may have a look at the idea I’ve quoted below. It’s actually better in this case that the files do not come zipped together, so it could work.

Regards
Derek

On 21 Dec 2012, 6:38 pm, waltd wrote:

To avoid the many issues with uploading large files with Freeway, consider this approach. Make a folder on your server inside the web root. Call it downloads or something like that. Inside this folder, place this file:

index.php · GitHub

Then upload all of your download-able files into that same directory. To integrate it into your Freeway page, use the iframe Action to create an iframe on your page. Make the URL of the iframe read downloads/index.php or similar. Preview from your server (this won’t work at all locally). You will see a list of all the files in that folder, except for the index.php file or any file that begins with a dot (hidden files, like .htaccess).

Anyone clicking on one of those links will download the file through their browser.

The zip thing would be nice, I agree, but it’s a bit of work to get going. You can’t have a single click download all of the files otherwise.

Walter


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