Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I created a mashup based the basic mashup template.Then I put a picture D:\QlikShare\StaticContent\Extensions\DemoTest(This is my mashup extension path).
Then I used the code <img src="index.jpg"
alt="welcome" /> in my HTML.
So what's wrong?Please help. How to use the picture in the mashup?
Also tried, still failed.Now See below:
Can you try it on your QSserver? Thanks
Hi,
If you reference it with <img src="index.jpg" it should be in the same directory as your html file, the main mashup directory. Make sure you include it in the zip file that you import on the server and it should work fine.
Note that this is the web server path, so there should be no D:, C: etc in the path.
Erik Wetterberg
Hi,
Thanks for your response.
Yes, it is in the same directory,the main mashup directory. I copy the picture file into the directory, this true?
Of course ,I also test the path like this:https://XXX/extensions/DemoTest/index.jpg.
But still failed. what's wrong?
Thanks.
Hi,
There are two ways to define the path, relative or absolute. Just giving the filename, "xxxx.jpg" means that it should be in the same directory as the html file where the link is, so a relative path. That's easier in most cases. If you use an absolute path the path depends on if you use a virtual proxy (should be in the path), the name of the qext file (also in the path, after /extensions/).
Have you chacked the browser console for errors? Can you open the image if you just type in the path to the image in the browser??
Erik Wetterberg
Hi,
I used a relative path and the picture is in the same directory as the html file where the link is .
The message is as belows:
the error says image not found
But the path is right.
See they are the same folder :
And you have put the file 'index.jpg' in the extension zip file and imported it through the QMC? I don't think copying it straight into the directory on disk will work.
Erik Wetterberg
So you mean I must export zip file first and then imported the zip through the QMC?
You might be able to add it through dev-hub but if not adding it to the extension zip file would do it. There is probably also a rest call you could make.
Erik Wetterberg