BLOB image

[size=“2”](translated by google translate, sorry if don’t understand well)[/size]

Hi all again, I have doubts on how to upload an image to a field in the database table BLOB data type, I’ve been watching the following wiki: http://www.yiiframework.com/wiki/95/saving-files-to-a-blob-field-in-the-database/

I have doubts about, that the breakdown points below:

1 .- Do I need the file name, size and type to store the image?

2 .- In the wiki, what is really the field that stores the image?

3 .- From what I see, to show the image to adjust the headers, do this will prevent display fields from the table as a tab? I explain better, I intend to store a picture of a person, with all its data, for a future show your card as a curriculum (that is what the application I’m doing), I am not a supporter of the BLOB fields, but I “forced” to be of that type.

4 .- A greeting and thanks s0mk3t.

I think yes cause in the actionDisplaySavedImage method you need it to set the correct headers

file_content

I’m not sure if I understand your question correct but I think it doesn’t matter for a tab display how your images are processed.

;)

If you don’t like blob, you can follow the wiki cited in the one you read for save in filesystem.

You can also download the file without setting the filesize and type, but, as it cost nothing, I prefer to save this fields and set all the headers.

You can also use this function instead of setting manually the headers.