I concur with the need for wstream resource. I need it for serving objects
straight out of Mongolia gridfs.

I would also like agile upload to support chunking straight into a function
or istream, that would mean I could put large uploads straight into gridfs,
without the need for a large intermediate file on the is.

I tried writing my own but my skillz aren't up to par yet.

I might have another go in a few months, if king Koen doesn't beat me ;)

Thanks,
Matthew
On 08/02/2011 10:29 PM, "Dmitriy Igrishin" <[email protected]> wrote:
> Hey all,
>
> Please note, that BLOB and bytea are different concepts in PostgreSQL:
>
> Large object (BLOB) - is a special structure which provides stream-style
> access
> to data.
>
> bytea - is a data type for storing binary strings.
>
> To process data of bytea type you need to retrieve the whole object
> from the database into a memory. Next, you may use WMemoryResource
> or save retrieved data to the file and use WFileResource.
>
> If you want to avoid working with whole objects (to avoid memory
overheads)
> you may want to use BLOB. To do this you need to extend WResource.
>
> Btw, I think it is reasonable to add WStreamResource into Wt -- the same
as
> WFileResource but for working with std::istream. I consider it useful.
> Koen, how do you think ?
>
> 2011/2/8 John Robson <[email protected]>
>
>> Worked, thanks.
>>
>> I would like show this image (from DB) in browser.
>>
>> How to convert std::vector<unsigned char> to WImage?
>>
>>
>> WResource *wr = new WResource((*i)->picture); (not work... abstract)
>>
>> WImage *img = new WImage(this);
>> img->setResource(wr);
>>
>> Thank you,
>> John
>>
>>
>>
>>
------------------------------------------------------------------------------
>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>
>
>
> --
> // Dmitriy.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to