|
Re: [speckcms] Re: Using Images
> When I use the Asset as the type for the cf_spProperty where I would
> like to give the individual the ability to select a photo, I get a
> Number stored in that field in the database. If I use Picker instead,
> then I get a UUID value in the field of the database. When the type is
> Picker, then the image gets uploaded to the server and within the Edit
> Screen of the admin.cfm I am able to view the picture even though it is
> 3456 x 2500 pixels in size. If I use the Asset value I do not view the
> picture in this edit screen.
If you use the Asset as the type when calling cf_spProperty, you should
see a number stored in the database. This is the revision number of the
containing content item, at which that version of asset was added (we do
this to support content versioning without having to store multiple
copies of each file). You should also see the uploaded picture displayed
in the edit window (as long as it's gif, jpg or png). There is something
wrong if you aren't seeing the image.
When you use a picker, a list of UUIDs is stored in the database field,
these are the ids of the picked content items, in this case instances of
the Image content type. When you use a picker, I'm assuming you can see
the images in the edit screen for the Image content type. The original
and thumbnail properties of the Image content type are asset properties.
The asset property is responsible for rendering the form field, and
displaying the image under the form field, and it appears to be working
as expected. Compare your call to cf_spProperty to define an asset
property to store images with those in the Image content type.
> I am currently on the 20070706 version of SpeckCMS.
I've just checked and there is no default maxWidth set for the original
property of the Image content type in that version, so the system is
working as expected when it is saving the image as is, without resizing.
To set a maxWidth with this version, you need to create a types
configuration file as explained in my previous email.
BTW, this is a very old version of Speck and there have been numerous
improvements and bug fixes since then. I highly recommend upgrading
(though, since you have such an old version, you should test that the
upgrade goes smoothly on a development machine first).
Mark
|