SmartClient Version: v8.3p_2013-04-05/PowerEdition Deployment (built 2013-04-05)
I'm trying to use datasource.getFileURL(record) to get a URL to use in an IMG. It's returning null and I'm looking for suggestions on what I may be missing. At the same point in my client code, I tried calling datasource.viewFile(record) using the same datasource and record - that works correctly which I interpret to mean that my ds.xml definition is OK and my images are stored in the database properly.
I was previously (sucessfully) fetching these images using the "encodeInResponse" option but have a need to support larger files in IE8.
My ds.xml:
I have tried removing the serverConstructor attribute with no change in behaviour.
I would normally include a showcase-type sample but this will be difficult given the database requirement.
Thanks,
Matt
I'm trying to use datasource.getFileURL(record) to get a URL to use in an IMG. It's returning null and I'm looking for suggestions on what I may be missing. At the same point in my client code, I tried calling datasource.viewFile(record) using the same datasource and record - that works correctly which I interpret to mean that my ds.xml definition is OK and my images are stored in the database properly.
I was previously (sucessfully) fetching these images using the "encodeInResponse" option but have a need to support larger files in IE8.
My ds.xml:
Code:
<DataSource dbName="SQLServer" tableName="map" ID="map" serverType="sql" serverConstructor="com.ricoh.mdm.cm.admintool.server.datasource.MapDataSource"> <fields> <field primaryKey="true" name="map_id" hidden="true" type="sequence"></field> <field name="map_name" type="ntext" length="255" required="true"></field> <field name="map_description" type="ntext" length="511"></field> <field name="map_filename" type="ntext" length="512" required="true"></field> <field name="map_parent_id" type="number"></field> <field name="map_parent_x" type="number"></field> <field name="map_parent_y" type="number"></field> <field name="dev_group_type_id" type="number" required="true"></field> <field name="dev_group_id" type="number" required="true"></field> <field name="map_image" type="imageFile"></field> </fields> <operationBindings> <operationBinding operationType="viewFile" requiresRole="readonly" operationGroup="DeviceBasicRead"> </operationBinding> <operationBinding operationType="fetch" requiresRole="readonly" operationGroup="DeviceBasicRead"> </operationBinding> <operationBinding operationType="add" requiresRole="admin" operationGroup="DeviceBasicWrite" groupRestricted="true" > </operationBinding> <operationBinding operationType="update" requiresRole="admin" operationGroup="DeviceBasicWrite" groupRestricted="true" > </operationBinding> <operationBinding operationType="remove" requiresRole="admin" operationGroup="DeviceBasicWrite" groupRestricted="true" > </operationBinding> </operationBindings> </DataSource>
I would normally include a showcase-type sample but this will be difficult given the database requirement.
Thanks,
Matt
Comment