To me it looks like Chrome has this consistently right. Seems to me like this should be a response with Content-Type:. Fix basic-popup-and-iframe-tests. One of the subtests in basic-popup-and-iframe-tests. The Blob URL is constructed from raw data and does not have a type. Every browser vender currently does something different when loading such a Blob URL in an iframe and there is an on-going discussion on whether an agreement can be made.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment. Linked pull requests. Posted Jul am enhzflep. Add your solution here. OK Paste as. Treat my content as plain text, not as HTML.
Existing Members Sign in to your account. This email is in use. Do you need your password? Submit your solution! When answering a question please: Read the question carefully. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.
Insults are not welcome. Don't tell someone to read the manual. Chances are they have and don't get it. You can have a look for more details on response type. I have used three ways for downloading file — two ways for Save as functionality and one way to show the file content on browser itself.
The above line create a Blob object with file content in response and expecting the file of JSON type. The above two lines create a URL that will open the file in browser in new window.
The above line shows the file content on browser, so it does not give you save as option. The above line uses ready-made FileSaver module that will open the file with Save as option. I have created service class to fetch file data from a server URL but I need to provide a link or button for downloading the file. In the view file I will give users two options for downloading the same file. I will use link as well as button for downloading the same file from the server.
In the service class I have used Http module which may not be found automatically. So I need to register it in providers array of NgModule. Run the Angular application angular-file-download by executing command ng serve --open. Use an invisible Iframe. If the file type is not nonsensical then set it up to make it as such. Here is how to do it: document.
Downloading an image using Javascript.
0コメント