Hi , i am developing an online booking system using web2py ...i have
come across a requiremnt where i need to store the clients photo into
the database(< 2MB)...how should i proceed with this........ .... .i
have achieved the functionality to store a image into the database
when i create a perticuler client...but the problem is the " same
image should be visible" when the we edit the clients page..but this
is not happening....when i checked in appadmin that image is getting
stored into the DB ....but i am unable to retrieve it back(for
viewing) on the edit client page
for storing i have used a DB field i.e. , Field('image','upload')
.
also i am using
<td>{{=form.custom.label.image}}:</td>
<td>{{=form.custom.widget.image}}</td>
how i can retrieve image back so that it becomes visible in smaller
size on the edit client page
Please suggest ...
On Mon, Oct 17, 2011 at 3:43 PM, Bruno Rocha <[email protected]> wrote:
> The recommended is:
>
> Store the pictures on the file system and picture locations in the
>> database.
>>
>> Why? Because...
>>
>> 1. You will be able to serve the pictures as static files.
>> 2. No database access or application code will be required to fetch
>> the pictures.
>> 3. The images could be served from a different server to improve
>> performance.
>> 4. It will reduce database bottleneck.
>> 5. The database ultimately stores its data on the file system.
>> 6. Images can be easily cached when stored on the file system.
>>
>>
> But if it is a requirement to store in database there is not to do about.
>
>
> On Mon, Oct 17, 2011 at 6:19 AM, Gour <[email protected]> wrote:
>
>> On Mon, 17 Oct 2011 05:57:32 -0200
>> Bruno Rocha <[email protected]> wrote:
>>
>> > If your image needs to be stored in database (not in filesystem) do:
>>
>> Is it, in general, recommended to store image (blob) of such size in the
>> {sqlite3,postgresql} database?
>>
>>
>> Sincerely,
>> Gour
>>
>>
>> --
>> When your intelligence has passed out of the dense forest
>> of delusion, you shall become indifferent to all that has
>> been heard and all that is to be heard.
>>
>> http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>>
>
>
>
> --
>
>
>
> --
> Bruno Rocha
> [ About me: http://zerp.ly/rochacbruno ]
> [ Aprenda a programar: http://CursoDePython.com.br ]
> [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
> [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
>
>