Hi Isomorphic,
I have run into a strange issue I can't reproduce, but perhaps you have an idea.
Setting: SaaS with light customer CD (main application color, logo)
So far, I uploaded the logo as part of the deploy step. Now it should come from the DB, so that color and logo changes are possible easily via settings change.
This does work as expected with FileUpload and DataSource.getFileURL(), but only for PNG/JPG files. The issue is that if I upload a SVG, it does not show up in my Img. It shows as broken image. When I do a "right click"->"Open in new Tab", the image is shown as expected. you have an idea.
It does though in the showcase, which is why I'm a bit confused. Do you have an idea?
Please note that I'm using SmartGWT and not SmartClient where it does not work.
This is my (working) testcase:
This SVG: https://en.wikipedia.org/wiki/File:W...ia-logo-v2.svg
Upload it as only file here (v11.1p_2018-05-24) (as only file, as otherwise the DB request returns two rows and then the servlet call fails):
For me in my application, the image does not display, but is shown as broken in the browser. In the developer console the request looks good as viewFile: status:CLEARED, like it does in the sample for [img1, img2].
On "right click"->"Show in new Tab" the image is displayed in the new tab like expected. Any idea why this is?
Best regards
Blama
I have run into a strange issue I can't reproduce, but perhaps you have an idea.
Setting: SaaS with light customer CD (main application color, logo)
So far, I uploaded the logo as part of the deploy step. Now it should come from the DB, so that color and logo changes are possible easily via settings change.
This does work as expected with FileUpload and DataSource.getFileURL(), but only for PNG/JPG files. The issue is that if I upload a SVG, it does not show up in my Img. It shows as broken image. When I do a "right click"->"Open in new Tab", the image is shown as expected. you have an idea.
It does though in the showcase, which is why I'm a bit confused. Do you have an idea?
Please note that I'm using SmartGWT and not SmartClient where it does not work.
This is my (working) testcase:
This SVG: https://en.wikipedia.org/wiki/File:W...ia-logo-v2.svg
Upload it as only file here (v11.1p_2018-05-24) (as only file, as otherwise the DB request returns two rows and then the servlet call fails):
Code:
isc.DynamicForm.create({ autoDraw: false, ID: "uploadForm", width: 300, dataSource: mediaLibrary, fields: [ { name: "title", required: true }, { name: "image", type: "imageFile", hint: "Maximum file size is 5 MiB" }, { title: "Save", type: "button", click: function () { this.form.saveData("if(dsResponse.status>=0) uploadForm.editNewRecord()"); } } ] }); isc.ListGrid.create({ autoDraw: false, ID: "mediaListGrid", width: "100%", height: 224, alternateRecordStyles: true, dataSource: mediaLibrary, canRemoveRecords: true, autoFetchData: true }); isc.Img.create({ ID: "img1", src: mediaLibrary.getFileURL(1), imageHeight: 150, imageWidth: 150 }); isc.Img.create({ ID: "img2", src: mediaLibrary.getFileURL(2), size: 150, }); isc.VLayout.create({ autoDraw: false, ID:"imgLayout", width:"100%", height:190, padding: 50, members:[img1, img2] }); isc.VLayout.create({ autoDraw: false, ID:"mainLayout", width:500, height:250, members:[mediaListGrid, imgLayout] }); isc.HStack.create({ width:"100%", membersMargin: 10, members:[uploadForm, mainLayout] });
On "right click"->"Show in new Tab" the image is displayed in the new tab like expected. Any idea why this is?
Best regards
Blama
Comment