Hi Folks,
I have a content-type which includes a set of file fields. I want to list this content in a view where each file field is expressed as a check-box indicating that the users would like to download a copy to their local machine. I envision a grid of content rows with specific file columns as check-boxes. Now I have a question: How do I loop over all the content displayed in the view to collect the list of download candidates? Additionally, how do I ask the user once for the download destination?
Chris.
Check this out
http://stackoverflow.com/questions/2339440/download-multiple-files-with-a-si...
This could be doable using javascript but not sure about the download location part though
Thanks *Anoop John* Chief Technology Officer
[image: Zyxware Technologies] http://www.zyxware.com Be the change you wish to see in the world - *M. K. Gandhi*
aj_zyxware
|
www.zyxware.com
|
www.facebook.com/zyxware
On Tue, Nov 26, 2013 at 1:31 AM, Chris Miller cjm@tryx.org wrote:
Hi Folks,
I have a content-type which includes a set of file fields. I want to list this content in a view where each file field is expressed as a check-box indicating that the users would like to download a copy to their local machine. I envision a grid of content rows with specific file columns as check-boxes. Now I have a question: How do I loop over all the content displayed in the view to collect the list of download candidates? Additionally, how do I ask the user *once* for the download destination?
Chris.
-- [ Drupal support list | http://lists.drupal.org/ ]
I’d recommend googling this yourself also, as this is one of a few mechanisms out there. There is reference to some other sample js code. Javascript sandboxes should prevent you from controlling save location or changing the users file save experience, but many browsers will have a default location for this.
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Anoop John Sent: Monday, November 25, 2013 3:55 PM To: support@drupal.org Subject: Re: [support] Multiple file download
Check this out
http://stackoverflow.com/questions/2339440/download-multiple-files-with-a-si...
This could be doable using javascript but not sure about the download location part though
Thanks Anoop John Chief Technology Officer
[Image removed by sender. Zyxware Technologies]http://www.zyxware.com Be the change you wish to see in the world - M. K. Gandhi [Image removed by sender.]
aj_zyxware
|
[Image removed by sender.]
www.zyxware.comhttp://www.zyxware.com
|
[Image removed by sender.]
www.facebook.com/zyxwarehttp://www.facebook.com/zyxware
On Tue, Nov 26, 2013 at 1:31 AM, Chris Miller <cjm@tryx.orgmailto:cjm@tryx.org> wrote: Hi Folks,
I have a content-type which includes a set of file fields. I want to list this content in a view where each file field is expressed as a check-box indicating that the users would like to download a copy to their local machine. I envision a grid of content rows with specific file columns as check-boxes. Now I have a question: How do I loop over all the content displayed in the view to collect the list of download candidates? Additionally, how do I ask the user once for the download destination? Chris.
-- [ Drupal support list | http://lists.drupal.org/ ]
From: "Anoop John" anoop.john@zyxware.com To: support@drupal.org Sent: Monday, November 25, 2013 3:55:21 PM Subject: Re: [support] Multiple file download
Check this out
http://stackoverflow.com/questions/2339440/download-multiple-files-with-a-si...
This is very clever and, interestingly, not beyond my ability. Even so, I don't think JavaScript in the browser is really the place to implement this function, if only because it requires the "cleverness" of creating the iframes and so on. Finally, believe it or not, there are still some people that disable JavaScript, and I don't see any degraded fall-back position for this design.
So, I still seek a native Drupal solution. If there is an existing way to accomplish this, then I should use that, and if not then I must consider a module.
I have a partial solution: I can represent the downloadable content in a view as a set of fields displayed as a check-box with a label, so if I can add a "Submit", then I think I can write a hook_menu function to receive and process the download request. I think I should be able to see the values of the set of check-boxes, and I hope the path to the file is a persistent property that I can also see.
I don't know how to add a "submit" button to a view.
Chris.
A single HTTP request can send back only one file. So I don't think a Drupal solution is possible.
Thanks *Anoop John* Chief Technology Officer
[image: Zyxware Technologies] http://www.zyxware.com Be the change you wish to see in the world - *M. K. Gandhi*
aj_zyxware
|
www.zyxware.com
|
www.facebook.com/zyxware
On Tue, Nov 26, 2013 at 5:44 AM, Chris Miller cjm@tryx.org wrote:
*From: *"Anoop John" anoop.john@zyxware.com *To: *support@drupal.org *Sent: *Monday, November 25, 2013 3:55:21 PM
*Subject: *Re: [support] Multiple file download
Check this out
http://stackoverflow.com/questions/2339440/download-multiple-files-with-a-si...
This is very clever and, interestingly, not beyond my ability. Even so, I don't think JavaScript in the browser is really the place to implement this function, if only because it requires the "cleverness" of creating the iframes and so on. Finally, believe it or not, there are still some people that disable JavaScript, and I don't see any degraded fall-back position for this design.
So, I still seek a native Drupal solution. If there is an existing way to accomplish this, then I should use that, and if not then I must consider a module.
I have a partial solution: I can represent the downloadable content in a view as a set of fields displayed as a check-box with a label, so if I can add a "Submit", then I think I can write a hook_menu function to receive and process the download request. I think I should be able to see the values of the set of check-boxes, and I *hope* the path to the file is a persistent property that I can also see.
I don't know how to add a "submit" button to a view.
Chris.
-- [ Drupal support list | http://lists.drupal.org/ ]
Perhaps this is a solution?
https://drupal.org/project/zipcart
Jamie Holly http://hollyit.net
On 11/25/2013 7:14 PM, Chris Miller wrote:
*From: *"Anoop John" <anoop.john@zyxware.com> *To: *support@drupal.org *Sent: *Monday, November 25, 2013 3:55:21 PM *Subject: *Re: [support] Multiple file download Check this out http://stackoverflow.com/questions/2339440/download-multiple-files-with-a-single-actionThis is very clever and, interestingly, not beyond my ability. Even so, I don't think JavaScript in the browser is really the place to implement this function, if only because it requires the "cleverness" of creating the iframes and so on. Finally, believe it or not, there are still some people that disable JavaScript, and I don't see any degraded fall-back position for this design.
So, I still seek a native Drupal solution. If there is an existing way to accomplish this, then I should use that, and if not then I must consider a module.
I have a partial solution: I can represent the downloadable content in a view as a set of fields displayed as a check-box with a label, so if I can add a "Submit", then I think I can write a hook_menu function to receive and process the download request. I think I should be able to see the values of the set of check-boxes, and I _*hope*_ the path to the file is a persistent property that I can also see.
I don't know how to add a "submit" button to a view.
Chris.
On 11/25/13, 3:01 PM, Chris Miller wrote:
Hi Folks,
I have a content-type which includes a set of file fields. I want to list this content in a view where each file field is expressed as a check-box indicating that the users would like to download a copy to their local machine. I envision a grid of content rows with specific file columns as check-boxes. Now I have a question: How do I loop over all the content displayed in the view to collect the list of download candidates? Additionally, how do I ask the user _*once*_ for the download destination?
Chris.
I suspect that the problem you are going to run into implementing the single ask for downloads location is the HTML security model. You, the server, do NOT get to tell the client where to put the file, it will either (possibly based on the user preferences) automatically place it in a default download folder, or it may let the user have it ask for a download location. The problem you are going to run into is that for a give http request, I believe you can only supply a single file, so to get multiple files download, it is going to require the use of java-script, and since each file is a different "transaction", the browser isn't going to normally let you link the destinations.