IDownloadManager, how to capture ALL file downloads (eg pdfs)? even if "content-disposition=attachment" header is not included in the servers response header?

Beantwortet IDownloadManager, how to capture ALL file downloads (eg pdfs)? even if "content-disposition=attachment" header is not included in the servers response header?

  • 2012년 3월 9일 금요일 오전 9:05
     
     

    hi,

    i'm working on an application hosting a webbrowser control that should save all downloaded files to some specific folder. my code works fine for files where the server specifies "content-disposition=attachment" in the response and filetypes not registered on the system.

    my problem: when a pdf is received  and "content-dispostion=attachment" is not specified in the response header , the adobe activex control shows up in the browser window and displays the content. my app should download the pdf instead through the download manager interface. disabling "display in browser" openes the pdf in the viewer itself, but does not trigger IDownloadManager.

    is there any way to turn off embedding ActiveX controls within the webbrowser? no global setting for the system, just for the webbrowser my app is hosting?

    any ideas?

    thanks,

    udo

모든 응답

  • 2012년 3월 9일 금요일 오후 4:43
     
     답변됨
    Since there is already an ActiveX document server registered for the PDF type, I think you have to register your own server to override it, and download the file after getting the url.


    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP