I have two servers with virtually identical setups (the second that is working has been around longer than the other). For my newer server when I just put an address to a PDF in the browser it launches a download dialog. If I put the same address (just changing the server name) in the browser to my older server it displays in the browser just fine. There is no difference between the files themselves. The issue is I want to display these pdfs in an iframe on a page and the same thing is happening with the iframe (the new server launches a download instead of the pdf just showing in the frame).
Any ideas would be most appreciated!
Once I started looking into SP 2010 as being the cause I found that there is a default setting for all new 2010 sites that causes this issue. The following blog post had the most complete information on the subject:
http://nerdtastictips.blogspot.com/2010/08/sp2010-forces-users-to-save-pdfs.html
Please indicate web server your are using
Initial suggestion may be this has to do with MIME-TYPE setup
Related
New to Web site dev, though have done a lot of coding of other sorts in the past, just set up a personal blog for my own amusement on bluehost using wordpress and have it installed locally for dev.
I have a training log on another site which anyone can open read-only to view training stats with a URL of the form below, this works fine in a browser:
https://www.othersite.com/logs/1234xyz/authenticate?password=thisismypassword
What I have tried to do unsuccessfully is have this open in a frame on one of my web pages (used iframe/object in html). It seems impossible to do this as the authentication string is not passed across, and the screen displayed prompts for manual input of the password. Can I open this automatically in some way?
If I understood well, your solution is insecure regardless it works or not. In this way your clients can see the password of your (or another) site.
I suggest to query the external content using custom php code and display (print) it on your page.
There are several ways to get content of an external page:
https://www.php.net/manual/en/function.stream-context-create.php
https://www.php.net/manual/en/function.curl-init.php
If you need a tutorial for WP plugins check this out:
https://www.wpbeginner.com/wp-tutorials/how-to-create-a-wordpress-plugin/
There are a several factors here (Heroku, Node, expressjs, react) as I'm working with a few technologies newer to me, so I'm not sure what the missing piece is.
I have a react/node app that is working for me in my local dev environment (using create-react-app).
My "/" route returns a list of documents, from which I create a list of links. When you click on one, it calls a route that returns a PDF.
This works great locally.
I've deployed it to Heroku and get the following behavior:
Click on link
Instead of opening the PDF, it opens a new tab with the correct URL, but the response is the list of documents instead of the selected PDF.
If I do a hard-reload, I get the same thing.
If I open dev tools in Chrome, I get the same thing.
If I open dev tools AND THEN do a hard-reload, I get the attachment to render!!
If I then do a reload again, it reverts back to showing me the list.
In Edge, I don't need to have dev tools open. Just a hard-reload will render the attachment, but clicking refresh after, brings the list back instead.
Things I've considered:
+ If it were a caching issue, I would expect subsequent reloads to render the PDF, despite whether the Control key were down or dev tools open. Both requests are returning 200, although the one that is not working as expected is returning 200 (from ServiceWorker). The Remote Addresses are also different.
+If it were a routing issue, I wouldn't expect the PDF to ever get rendered properly.
Things I've noticed in hunting this down:
+ The requests are differing
Any guidance is greatly appreciated!
Okay, I've figured it out. The rubber duck helped me :-)
If I don't use https, all is working fine. I'm not sure, however, why dev tools + hard reload allows me to make the request properly.
I have a HTML file, which I've uploaded as a web resource and linked to via an activity's form designer in an IFRAME. So far, so good.
Then, when I edited the source file locally and uploaded it (browse-save-publish, of course), I got no difference in the appearance on the screen. Here's the weird part. When I open the uploaded file in the editor, I can see the changes to my source code. On the RTF tab I can also see the change in colors of the background.
However, reloading the "create new"-form doesn't bring those changes to the client! I've tried restarting the window, restarting IE, clearing the cache. Nothing helps.
When I entered the very same page from a different client, I got to see the updated version. But after that, the subsequent changes are not updated either. It's like if IE thinks "oh, matey, ya wanna cache that for life, I see". Well, I don't. I'd like to see my edition in action pretty much directly and without creating a new account with a new client. :)
After a while, the update seems to go through and I get to see a new version but not in all browsers.
What is causing it?! How do I kill it?
(Win8/IE10/CRM11OL)
I have seen CRM do some weird IIS Caching. I'd assume this is a server side issue, but your using crm online, they won't let you run an IIS reset now will they? :) Have you tried running it on a new client in private browsing mode, deploying your change, and opening a new private browser to test if it is a client caching issue or a server caching issue?
In my app I have a richtext field in which I display text and I want to display images too. The images are being displayed perfectly on my local PC, I also have a test server installed on my local PC and that works too.
But when I create a document on the production server, the image is not displayed. Firefox hides it completely and Chrome shows broken image link.
This is the created url on local machine:
http://localhost:86/Folder/Folder/myapp.nsf/xsp/.ibmmodres/persistence/DominoDoc-3-Body/_2_07B23E640790993000318CC8C1257A05.jpeg
This is the url on the server:
http://domain.mk/Folder/myapp.nsf/xsp/.ibmmodres/persistence/DominoDoc-59-Body/_2_06176AD0070E4830003325DCC1257A05.jpeg
I appreciate the help :)
Is your image available for anonymous users? Can it be that the access to the file is the problem?
Ok I finally have sorted this out. It has something to do with the caching or whatnot. If you open the document in the browser right after saving it in Notes, it acts like the image is not actually uploaded. So I refreshed the page after 1-2 minutes and the image is there.
Sometimes when you view a file on a page on its own, the browser has some default way of viewing it, like to place it in an image or video tag, or invoke some plugin. Other times, it just downloads the file.
Sometimes this is because of headers set by the server, but lets ignore that for now. For some file types, it doesn't matter what headers were set -- the browser will try to download them regardless.
Some of the types that the browser will view are listed in navigator.mimeTypes. However, this is not authoritative. The iPad can view Microsoft Office files but it does not report this.
Is there any simple way to figure out what the browser is going to do with a file before it does it?