Dear Support,
as suggested in DataSource.getFileURL() we are using this method to get an url to an image stored in the DB that we can then pass to an Img widget.
Here is the (simple test case) data source:
We call the service, which returns a rather long URL:
The URL:
But the data never comes up to the client... we can see a DSRequest issued in the RPC tab, but it stays as "Transaction in Progress", no specific error in the output...
If we copy/paste the URL in the address bar of a browser, we receive a 200 of type html/text.
Can you please help us?
Many thanks (and happy new year to all the team!),
Regards,
Thomas
as suggested in DataSource.getFileURL() we are using this method to get an url to an image stored in the DB that we can then pass to an Img widget.
Here is the (simple test case) data source:
Code:
<DataSource ID="test" serverType="sql" tableName="SYS_ATTACHMENT" > <fields> <field name="ID" type="sequence" sequenceName="SQ_SYS_ATTACHMENT" hidden="true" primaryKey="true" /> <field name="ATTACHMENT" type="image" title="$attachment"/> </fields> </DataSource>
Code:
Record r = new Record(); r.setAttribute(DSImageAttachment.ID, pictureId); String url = DataSource.get("test").getFileURL(r, "ATTACHMENT");
Code:
http://127.0.0.1:8888/application/sc/IDACall/undefined?isc_rpc=1&isc_v=v9.0p_2013-10-01&isc_tnum=13&_transaction=%3Ctransaction%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E13%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype%3D%22xsd%3AList%22%3E%3Celem%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Ccriteria%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Cdownload_fieldname%3EATTACHMENT%3C%2Fdownload_fieldname%3E%3C%2Fcriteria%3E%3CoperationConfig%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3CdataSource%3Etest%3C%2FdataSource%3E%3CoperationType%3EviewFile%3C%2FoperationType%3E%3C%2FoperationConfig%3E%3CuseStrictJSON%20xsi%3Atype%3D%22xsd%3Aboolean%22%3Etrue%3C%2FuseStrictJSON%3E%3CappID%3EbuiltinApplication%3C%2FappID%3E%3Coperation%3Etest_viewFile%3C%2Foperation%3E%3ColdValues%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3Cdownload_fieldname%3EATTACHMENT%3C%2Fdownload_fieldname%3E%3C%2FoldValues%3E%3C%2Felem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E
If we copy/paste the URL in the address bar of a browser, we receive a 200 of type html/text.
Can you please help us?
Many thanks (and happy new year to all the team!),
Regards,
Thomas
Comment