Re: Lasso 8.04 return image from FMSA FMContainer

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.04 return image from FMSA FMContainer

detlef.hebbel
Hello.
I have a further question please:
As this works fine:

>>> <?LassoScript
>>>      content_type: 'image/jpeg';
>>>      inline:
>>>          -database = 'db',
>>>          -table = 'tb',
>>>          -keyvalue = 1,
>>>          -novaluelists,
>>>          -search;
>>>          $__html_reply__ = (database_fmcontainer:
>>> 'ImageGeneric_PhotoSmall');
>>>      /inline;
>>>      abort;
>>> ?>

How can I tweak this Script to save the image into a folder and giving it a
name 'MyImage.jpg'?

Thanks

Detlef





on 17.05.2005 12:25, Adam Randall at [hidden email] wrote:

> You can't have the image served on the page that you want it to
> appear on. To do it, you have to create an image file, like
> image.lasso, and inside of that, you'd have the code I suggested, or
> Fletcher's. You are dealing with direct binary data here, and it's
> not the same concept as the old, and insecure, image_url.
>
> Adam.
>
> --
> Adam Randall <[hidden email]>
> http://www.omnipilot.com/
> (954) 874-3100
> AIM/iChat: adamomni
>
> On May 16, 2005, at 5:34 PM, Detlef Hebbel wrote:
>
>> Thanks Adam!
>>
>> WOW - it worked!
>>
>> I changed it to:
>>
>> <?LassoScript
>>      content_type: 'image/jpeg';
>>          $__html_reply__ = (database_fmcontainer:
>> 'ImageGeneric_PhotoSmall');
>>      abort;
>> ?>
>>
>> within in update page inline. But it is showing the one image only
>> and is
>> omitting all other of the page.
>> I need to show the pictures in and update and detail page. How can
>> I use
>> this in a composite page (update form and detail page) with
>> multiple images,
>> text?
>>
>> You help is very much appreciated.
>>
>> Detlef
>>
>>
>> on 17.05.2005 03:48, Adam Randall at [hidden email] wrote:
>>
>>
>>> I believe that Fletcher originally suggested the use of File_Serve,
>>> which seems to work in most cases.. If you are having troubles,
>>> however, I recommend this:
>>>
>>> <?LassoScript
>>>      content_type: 'image/jpeg';
>>>
>>>      inline:
>>>          -database = 'db',
>>>          -table = 'tb',
>>>          -keyvalue = 1,
>>>          -novaluelists,
>>>          -search;
>>>          $__html_reply__ = (database_fmcontainer:
>>> 'ImageGeneric_PhotoSmall');
>>>      /inline;
>>>
>>>      abort;
>>> ?>
>>>
>>> Adam.
>>>
>>> On May 15, 2005, at 10:57 PM, Detlef Hebbel wrote:
>>>
>>>
>>>> Yes, this was, or better: is a bit of a ride"
>>>>
>>>>
>>>>
>>>>> [file_serve: (database_fmcontainer: 'ImageGeneric_PhotoSmall'),
>>>>> -file='ImageGeneric_PhotoSmall.jpg', -type='image/jpeg']
>>>>>
>>>>>
>>>>
>>>>
>>>> 1. When I use  "File_Serve" it brings an empty page and downloads
>>>> the image
>>>> separately.
>>>>
>>>> 2. When I remove "File_Serve" it bring s a Byte Stream....
>>>>
>>>> 3. What is the solution? ....is it Adam Randall's:
>>>>
>>>>  image.lasso:
>>>>  ------------
>>>>  [Inline: -Database='Respondents', -Table='web', 'name'=
>>>> (Action_Param:
>>>>  'name'), -Search]
>>>>  [file_serve: (database_fmcontainer: 'Logo'), -file='testing.jpg',
>>>>  -type='image/jpeg']
>>>>  [/Inline]
>>>>
>>>> Or is there any easier solution? Please ...
>>>>
>>>> Cheers
>>>>
>>>> Detlef
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> on 16.05.2005 13:34, Detlef Hebbel at [hidden email] wrote:
>>>>
>>>>
>>>>
>>>>> So far so good:
>>>>>
>>>>> In an inline:
>>>>>
>>>>> [file_serve: (database_fmcontainer: 'ImageGeneric_PhotoSmall'),
>>>>> -file='ImageGeneric_PhotoSmall.jpg', -type='image/jpeg']
>>>>>
>>>>> This is returning a blank page but a download as well! Now, how to
>>>>> have the
>>>>> image appearing in the page, nor as download?
>>>>>
>>>>> Anybody and idea?
>>>>>
>>>>> Cheers
>>>>>
>>>>> Detlef
>>>>>
>>>>>
>>>>> on 16.05.2005 13:15, Detlef Hebbel at [hidden email] wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Thanks Miles.
>>>>>>
>>>>>> I have come as far as " [Database_FMContainer]" which is
>>>>>> returning a byte
>>>>>> stream.
>>>>>> Then I embedded this into "[File_Serve]" where I am stuck now ...
>>>>>>
>>>>>> Will have a look to the archives again now, thanks.
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> Detlef
>>>>>>
>>>>>>
>>>>>> on 16.05.2005 13:11, m i l e s at [hidden email] wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Detlef,
>>>>>>>
>>>>>>> You're in for a ride.
>>>>>>>
>>>>>>> Check the archives...
>>>>>>>
>>>>>>> http://www.listsearch.com/lassotalk.lasso?id=146296
>>>>>>>
>>>>>>> OR
>>>>>>>
>>>>>>> http://www.listsearch.com/lassotalk.lasso?id=140265
>>>>>>>
>>>>>>> OR
>>>>>>>
>>>>>>> http://www.listsearch.com/lassotalk.lasso?id=140259
>>>>>>>
>>>>>>> That will get you started and are recent threads on the pervasive
>>>>>>> subject matter...
>>>>>>>
>>>>>>> M i l e s.
>>>>>>>
>>>>>>> ---- LASSO DEVELOPER FOR HIRE: CHEAP RATES - NEEDS WORK ----
>>>>>>>   *!- lasso tips for newbies - look fro them every monday -*
>>>>>>> ------------------------------------------------------------
>>>>>>> M i l e s                                [hidden email]
>>>>>>> MagicMiles Software                         (413) 374 - 5161
>>>>>>> http://www.magicmiles.com         AIM/Yahoo/MSN:  magikmiles
>>>>>>> ------------------------------------------------------------
>>>>>>> I create content management systems for the rest of humanity,
>>>>>>> starting at just $25 a month, includes domain registration,
>>>>>>> web hosting, email and webmail -- PLUS -- * TOOLBOXENGINE*!
>>>>>>> ------------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ------------------------------
>>>> Lasso Support: http://support.omnipilot.com/
>>>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>>>> Manage your list subscription:
>>>> http://www.listsearch.com/lassotalk.lasso?manage
>>>>
>>>>
>>>
>>>
>>
>>
>>
>> --
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription:
>> http://www.listsearch.com/lassotalk.lasso?manage
>>
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.04 return image from FMSA FMContainer

m i l e s

Detlef,

 >How can I tweak this Script to save the image into a folder and  
giving it a
 >name 'MyImage.jpg'?

<?LassoScript
      content_type: 'image/jpeg';
      inline:
          -database = 'db',
          -table = 'tb',
          -keyvalue = 1,
          -novaluelists,
          -search;
          $__html_reply__ = (database_fmcontainer:  
'ImageGeneric_PhotoSmall');
             file_write: '/path/filename',  
(database_fmcontainer:'imageGeneric_PhotoSmall'));
      /inline;
      abort;
?>

Just a guess.  Off the top of my head.

M i l e s.



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.04 return image from FMSA FMContainer

detlef.hebbel
In reply to this post by detlef.hebbel
Thanks Miles.

1. One ')' to many. removed that and it will open image in browser, but not
saving as file.

2.

This will show now error, but returns an empty page, no file saved:

> <?LassoScript
>       content_type: 'image/jpeg';
>       inline:
>           -database = 'db',
>           -table = 'tb',
>           -keyvalue = 1,
>           -novaluelists,
>           -search;
>              file_write: '/path/filename',
> (database_fmcontainer:'imageGeneric_PhotoSmall');
>       /inline;
>       abort;
> ?>


Any more ideas?

Thanks

Detlef



on 22.05.2005 13:11, m i l e s at [hidden email] wrote:

>
> Detlef,
>
>> How can I tweak this Script to save the image into a folder and
> giving it a
>> name 'MyImage.jpg'?
>
> <?LassoScript
>       content_type: 'image/jpeg';
>       inline:
>           -database = 'db',
>           -table = 'tb',
>           -keyvalue = 1,
>           -novaluelists,
>           -search;
>           $__html_reply__ = (database_fmcontainer:
> 'ImageGeneric_PhotoSmall');
>              file_write: '/path/filename',
> (database_fmcontainer:'imageGeneric_PhotoSmall'));
>       /inline;
>       abort;
> ?>
>
> Just a guess.  Off the top of my head.
>
> M i l e s.
>
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 8.04 return image from FMSA FMContainer

Andreas Steinmann
In reply to this post by detlef.hebbel
It's strange - and it has nothing to do with image or your code.

I asked the list last year - no answer
You did so in October - no answer
Pär Dalhielm in December and again in March - no answer
And here you are again, now it's May!

I encountered, that restarting the FMPro databases does not do the trick.
Restarting Lasso does - sometimes...

Please check, whether there are wrong aliases in the Lassos database setup
(Alias names are in parentesis after the database name)
I went up and running after deleting an alias -
actually it was the name of annother database -
don't know how it went there.

Sometimes Lasso admin app does strange things.
eg. sometime it's impossible do get beond the
first 20 databases in the list of databases for a
server. But than  closing down the browser window
and connecting again, it does work. Or deleting
an now unused database setting - it might delet
annother one from the list - so I stopped doing
that.
(Lasso 7.1.3)

Andreas

----------------------------------------------------------
I just installed an Xserv with Lasso 7.04. works
fine with MySQL but not with FileMaker:

It sees the database server and all the databases, but they are not awailable:

FILEMAKER_CONNECTOR error 57 after send()1 os msg Socket is not connected

What's wrong?

Andreas
----------------------------------------------------------
Something is wrong with the communication between FMSA-box
and Lasso 7.1.1 box (both OSX). 100Mb network.

Lasso Admin > Utility > Errors report this:

Critical
FILEMAKER_CONNECTOR error 22 after recv()1 os msg Invalid argument

Critical
FILEMAKER_CONNECTOR error 57 after send()1 os msg Socket is not connected

Where do I start?

--
Roy Gabrielsen
Dialogue.dk
----------------------------------------------------------
Hello.

I'm getting this error message quite often:
"FILEMAKER_CONNECTOR error 57 after send()1 os msg Socket is not connected"

I'm running Lasso 7.1.3 on an osx server and FMPro Unlimited 6 v4 (webcomp
v3) on osx.

When this happens the format pages are blank - like when the datebase has
crashed. I have been looking for time out setting but without luck.

Somebody experienced this?
Somebody got a solution?

/pär
----------------------------------------------------------


>It seams to work for me, but the server still have this error message:
>FILEMAKER_CONNECTOR error 57 after send()1 os msg Socket is not connected
>
>Result = 1-2 of 9 images showing up on a thumb page.
>I'm stuck with this for a long time now.
>
>Lasso 7.1.3 and FMSA on another box.
>
>--
>Roy Gabrielsen
>
>
>>  From: Douglas Burchard <[hidden email]>
>>  Reply-To: "[hidden email]" <[hidden email]>
>>  Date: Wed, 18 May 2005 09:06:44 -0700
>>  To: "[hidden email]" <[hidden email]>
>>  Subject: Re: Lasso 8.04 return image from FMSA FMContainer
>>
>>  On May 18, 2005, at 12:05 AM, Mikael Sundström wrote:
>>
>>>  What I do not get is why programmers used to just
>>>  entering a pretty down-to-earth [field] tag to present data should
>>>  suddenly have to create secondary files, or have to resort to any
>>>  weird contortions just to serve what must be a very common data
>>>  type.
>>
>>  What you're asking for is the old [IMG] tag.
>>
>>       <http://ldml.omnipilot.com/LDMLReference.0.LassoApp?tag=387>
>>
>>  However, to use this tag you need to turn on "Classic Lasso Syntax",
>>  which is a security risk! But if that's what you want, go ahead. The
>>  functionality is there (at least I think so, I haven't tried it with
>>  FMP7).
>>
>>       <http://www.listsearch.com/LassoTalk.lasso?id=139723>
>>
>>  The method of using a separate format file is *really* the the way
>>  you want to go, and is EASY. Just create a file (we'll name it
>>  'image.lasso') like this:
>>
>>  <?LassoScript
>>
>>       Content_Type: 'image/jpeg';
>>       Inline:
>>               -Database='db',
>>               -Table='tb',
>>               -KeyValue=(Action_Param: 'id'),
>>               -NoValueLists,
>  >              -MaxRecords=(1),
>>               -Search;
>>           $__html_reply__ = (Database_FMContainer: 'yourfieldname');
>>       /Inline;
>>       Abort;
>>
>>  ?>
>>
>>  This file will work for every image in you table and that container
>>  field, so you'll only have to do this once. Then, in you're existing
>>  format file simply construct the URL in your <img> tags like this:
>>
>>       [Records]
>>           <img src="image.lasso?id=[KeyField_Value]">
>>       [/Records]
>>
>>
>>  --
>>  Douglas Burchard, President
>>  DouglasBurchard.com, Web Applications
>>  15024 NE 66th Street
>>  Redmond, WA  98052, USA
>>
>>  direct: (206) 227-8161
>>  [hidden email]
>>  http://www.douglasburchard.com/
>>
>>
>>  --
>>  ------------------------------
>>  Lasso Support: http://support.omnipilot.com/
>>  Search the list archives: http://www.listsearch.com/lassotalk.lasso
>>  Manage your list subscription:
>>  http://www.listsearch.com/lassotalk.lasso?manage
>
>
>
>--
>------------------------------
>Lasso Support: http://support.omnipilot.com/
>Search the list archives: http://www.listsearch.com/lassotalk.lasso
>Manage your list subscription:
>http://www.listsearch.com/lassotalk.lasso?manage


--
  N A T F I L M    F E S T I V A L
  --------------------------------
  St. Kannikestr. 6
  DK-1169 Copenhagen K     Denmark
  Tel. +45 3312 0005
  Fax  +45 3312 7505
  --------------------------------
  <mailto:[hidden email]>
  <http://www.natfilm.dk>

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage