Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

simple media update

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


zdravko.balorda at siix

Jan 10, 2012, 11:48 PM

Post #1 of 5 (711 views)
Permalink
simple media update

Hi,
I need to save some json code into a media file from a template.
All I find is
$image->upload_file( $fh, $fname );

How to store a string directly into $image file?

Regards, Zdravko


david at justatheory

Jan 11, 2012, 9:04 AM

Post #2 of 5 (681 views)
Permalink
Re: simple media update [In reply to]

On Jan 10, 2012, at 11:48 PM, Zdravko Balorda wrote:

> Hi,
> I need to save some json code into a media file from a template.
> All I find is
> $image->upload_file( $fh, $fname );
>
> How to store a string directly into $image file?

Open a file handle on the JSON string:

open my $fh, '<', \$json;
$image->upload_file($fh, 'some.json');

HTH,

David


david at justatheory

Jan 11, 2012, 9:04 AM

Post #3 of 5 (670 views)
Permalink
Re: simple media update [In reply to]

On Jan 10, 2012, at 11:48 PM, Zdravko Balorda wrote:

> Hi,
> I need to save some json code into a media file from a template.
> All I find is
> $image->upload_file( $fh, $fname );
>
> How to store a string directly into $image file?

Open a file handle on the JSON string:

open my $fh, '<', \$json;
$image->upload_file($fh, 'some.json');

HTH,

David


zdravko.balorda at siix

Jan 11, 2012, 10:11 PM

Post #4 of 5 (668 views)
Permalink
Re: simple media update [In reply to]

David E. Wheeler wrote:
> On Jan 10, 2012, at 11:48 PM, Zdravko Balorda wrote:
>
>> Hi,
>> I need to save some json code into a media file from a template.
>> All I find is
>> $image->upload_file( $fh, $fname );
>>
>> How to store a string directly into $image file?
>
> Open a file handle on the JSON string:
>
> open my $fh, '<', \$json;
> $image->upload_file($fh, 'some.json');
>

This works, too?! Well, all one needs to know in life, is Perl. :)
Thanks, Zdravko


zdravko.balorda at siix

Jan 11, 2012, 10:11 PM

Post #5 of 5 (671 views)
Permalink
Re: simple media update [In reply to]

David E. Wheeler wrote:
> On Jan 10, 2012, at 11:48 PM, Zdravko Balorda wrote:
>
>> Hi,
>> I need to save some json code into a media file from a template.
>> All I find is
>> $image->upload_file( $fh, $fname );
>>
>> How to store a string directly into $image file?
>
> Open a file handle on the JSON string:
>
> open my $fh, '<', \$json;
> $image->upload_file($fh, 'some.json');
>

This works, too?! Well, all one needs to know in life, is Perl. :)
Thanks, Zdravko

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.