Atachments confirmation - InfoPath Dev
in

InfoPath Dev

Atachments confirmation

Last post 04-06-2010 10:30 AM by bbolling. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-01-2007 06:26 AM

    Atachments confirmation

    I have a form template wich is browser-enabled and published to document library in Sharepoint 2007 as content type. My form has atachment. So everything is ok. But when I open my form in browser and try to open my atachment by double clicking, I get a confirm message "You have chosen to download a file that may be harmful to your computer. It is important to be certain that the file comes from a trustworthy source.". When I click "Yes" - I open a file. But I don`t wanna to see this confirmation message. I want to open this file immediatly. Is there a posibility to do this ???
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 02-01-2007 06:28 AM In reply to

    Re: Atachments confirmation

    I forgot to say that I have Internet Explorer 7.0 and Windows Server 2003 OS...
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 02-01-2007 08:05 AM In reply to

    Re: Atachments confirmation

    Hi Alexander,
    If this was Windows XP SP2 and the file was XML, I'd say there is a Windows Shell setting to remove the warning. Since you have Windows Server, I'd have to say this is IE7 setting related. Look in Internet Explorer Security tab for the setting. You should also try trusting the site or domain (add to local intranet and see if that makes a difference). Sorry I can't be more helpful.
    Patrick Halstead
    Project Manager at Qdabra
  • 02-02-2007 03:29 AM In reply to

    Re: Atachments confirmation

    Just an idea for a small workaround. If I remember correctly you can define file types you want the user to be able to attach (e.g. .pdf .doc). Like this you can at least take care that users do not attach any .exe for example which could harm your network/pc.

    This of course does not solve your problem but..
    Listen to Motörhead cos they play Rock'n Roll :)
  • 02-02-2007 04:00 AM In reply to

    Re: Atachments confirmation

    quote:
    Originally posted by nukkumatti

    Just an idea for a small workaround. If I remember correctly you can define file types you want the user to be able to attach (e.g. .pdf .doc). Like this you can at least take care that users do not attach any .exe for example which could harm your network/pc.

    This of course does not solve your problem but..



    Yes, you are right, but this is not solution for my issue. I know about this feature... But, any way, thanks...
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 04-06-2010 10:30 AM In reply to

    Re: Atachments confirmation

    I ran into the same problem and will post my solution for others encountering this issue. In the file "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\INC\intlcoresettings.js" there is a string variable that controls the text of the message:

    IntlCoreStrings.k_strFileAttachmentDownloadPrompt = "You have chosen to download a file that may be harmful to your computer. It is important to be certain that the file comes from a trustworthy source. Do you want to continue?";

    This can be changed to any message you like. If you want to completely disable the message altogether you have to modify "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\INC\Core.js". I will warn everyone that modifying ANY of the files I am mentioning here is NOT SUPPORTED BY MICROSOFT. These files are used globally throughout your SharePoint farm so any changes you make here will reflect everywhere they are  used throughout your SharePoint farm. This file can also be overwritten by any SharePoint updates or Service Packs which will cause your change to be lost. I am not advocating this approach but I am trying to shed a little light on this. Both of the Javascript files identified above are referenced from FormServer.aspx page (in \12\TEMPLATE\LAYOUTS). This page contains the XmlFormView control that renders the InfoPath form template to the web browser. Since this control renders the Javascript tags I have not found an elegant way to override Core.js which leads me to this solution. Within Core.js there is a line of code as follows:

    var boolCanDownload = UserMessages.ShowConfirmMessage(IntlCoreStrings.k_strFileAttachmentDownloadPrompt, true);

    This line of code is calling a function that shows the message box and passes in the string variable to display the message. But if you comment this line out and insert a new line of code as follows:

    var boolCanDownload = true;

    then you are overriding the message box altogether and the file will download without the end user seeing the message box.

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.