Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hii,
Actually i created mashup, I want to display a pdf file in a mashup (webframe), but the problem is that when i click on a grid i download the pdf file instead of display it in a webframe. Can u help me to do that.. I attached my screenshot below.
Hello @DMu3,
You're asking two questions:
Regards,
Constantine
Hello,
Thank you for your reply,.
Where i have to give this code? I used service that is GetFileListingWithLinks.
location ~* /(.*\.pdf) {
proxy_hide_header Content-Disposition;
add_header Content-Disposition "inline";
... the rest of redirect config ...
}
Hello,
I don't know how to use that code. Can you explain that where i have to give that code and how to fix that issues?
This is not code, it's an example of NGINX configuration file, in case you use it as a reverse proxy.
/ Constantine
Hi,
okay, I set this link in my url,
http://<host>:<port>/Thingworx/FileRepositoryDownloader?download-repository=<RepositoryName>&directRender=true&download-path=/my%20file.pdf
But, I can't able to view my pdf file, and I attached my screenshot below,
Hii,
Actually, i tried to fix this issues, then also i can't able to view pdf file. I attached my screenshot below. Can you help me to finish this one.
Hello @DMu3,
There are several issues with this approach -- mainly because you need to hardcode server hostname in your application. There's a better way -- try this:
var result = Things["TestDrive"].GetFileListingWithLinks({
path: '/',
nameMask: code + '.pdf'
}).downloadLink;
If it gives you similar errors, then try to press F12 and see where this error comes from -- you should be able to see the failing HTTP request and identify the issue by looking at returned error message. You should be able to find equivalent information in the Script and Application logs in ThingWorx as well.
/ Constantine