Oct 14
Christoph Toth How to download numerous image files
Oct 14, 2014; 17:29
Christoph Toth
How to download numerous image files
Hello Lasso-ers,
I need to come up with a "download-all" function such that a link will
download the source files for ALL currently returned images. I already have
a one-off "download-me" function, which downloads a single image. This uses
the [File_serve] method. It is working fine.
But downloading a set of images requires iterating through a list of their
file paths. So far my approach has been to store the query that returned the
current set of images in a variable, then I re-submit it to kick it off. The
response page to the "download-all" button iterates through each image via
the [records] block.
So far so good. In fact, if I insert an appropriately defined File_serve
method within the [Record] block, it works! But only the very first
image/record. This is because [File_Serve] automatically ends with an abort.
Thus, it never gets past the first image.
I've tried using web_response->sendFile(#image->data, -type='image/gif'),
which seems to have a boolean option to turn off the default abort. But I
must be doing something wrong because all I get are errors:
Error Code: -9948
Error Msg: Definition Not Found: string->data()
Also, the concept of altering the http headers makes no sense to me in this
context, because I have to iterate over the records; thus, I am already
'parked' on a page with prior invoked headers. Am I not? So, how could they
be altered on this "page"?
I have also crafted an approach where each [record] opens a new browser
window via javascript. The new window then executes the [File_serve]. This
actually works. But it's a massive hack and relies on users to disable bock
popups. Since [File_Serve] also aborts all activity in the window, I have
not figured out how to close it. Thus, I am left with a small blank window
for each image that's been downloaded. Up to fifty images could be
downloaded at a time; Thus, this approach is less than ideal.
There must be some better way. Any help would be appreciated.
Using Lasso 9.2.7; OSX server; FileMaker 11
Thanks much!
--
View this message in context: http://lasso.2283332.n4.nabble.com/How-to-download-numerous-image-files-tp4642324.html
Sent from the Lasso - Talk mailing list archive at Nabble.com.
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Oct 14
Brad Lindsay Re: How to download numerous image files
Oct 14, 2014; 20:36
Brad Lindsay
Re: How to download numerous image files
Oct 15
Lists Re: How to download numerous image files
Oct 15, 2014; 17:01
Lists
Re: How to download numerous image files
Oct 15
Lists Re: How to download numerous image files
Oct 15, 2014; 17:01
Lists
Re: How to download numerous image files
Oct 15
Wade Maxfield Re: How to download numerous image files
Oct 15, 2014; 21:25
Wade Maxfield
Re: How to download numerous image files
Oct 15
Jolle Carlestam Re: How to download numerous image files
Oct 15, 2014; 12:01
Jolle Carlestam
Re: How to download numerous image files
Aug 31
Anibal Escobar Re: How to download numerous image files
Aug 31, 2015; 18:46
Anibal Escobar
Re: How to download numerous image files
Aug 31
Ke Carlton Re: How to download numerous image files
Aug 31, 2015; 22:52
Ke Carlton
Re: How to download numerous image files
Sep 01
Rick Draper RE: How to download numerous image files
Sep 01, 2015; 09:03
Rick Draper
RE: How to download numerous image files
Aug 31
steffan Re: How to download numerous image files
Aug 31, 2015; 16:47
steffan
Re: How to download numerous image files
Aug 31
Steffan Cline Re: How to download numerous image files
Aug 31, 2015; 22:22
Steffan Cline
Re: How to download numerous image files
Sep 01
Anibal Escobar Re: How to download numerous image files
Sep 01, 2015; 10:06
Anibal Escobar
Re: How to download numerous image files