Upload huge files into infoapth form - InfoPath Dev
in

InfoPath Dev

Upload huge files into infoapth form

Last post 03-02-2014 11:46 PM by wilkies0106aw. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-27-2014 02:11 AM

    Upload huge files into infoapth form

    Hi ,

    Am an infopath2010 developer  and am implementing forms using infopathform 2010.

    Recently  one of my user want to attach 20-30 MB file into infopath form. But due to our company policy ,we are not allow to upload more that 10MB files into infopath itself and not ready to increase the infopath size limit in "Central Administration".  Can you please help me what is the alternative way to upload the 30MB file size in infoapth form rather increasing the file size limit in "Central administraor".

    Thanks
    Rajesh
  • 02-27-2014 02:42 AM In reply to

    Re: Upload huge files into infoapth form

    You can't if you're not going to increase anything.

    An alternative that comes to mind is to create a document set and upload the files to the document set. Then you'll need to "link" the two together i.e using a url.

  • 02-27-2014 11:25 PM In reply to

    Re: Upload huge files into infoapth form

    Hi  Thanks for your reponse.

    Alternatively do you have any approach  or is that possibel to upload docuemnts to document libray using Infopath Managed Code ?? I was trying but unfortunately , when am attaching the file it is pointing to Server URL. is that possibel to browse the file from client mahcine to sharepint docuemnt??

    Thanks
    Rajesh
  • 02-28-2014 03:46 AM In reply to

    Re: Upload huge files into infoapth form

     I am sure it is, but I stay away from managed code as it makes maintaining and updating forms tricker.

     If you want to browser to a directory, the easiest way would be to use a mapped drive.

  • 03-02-2014 07:57 PM In reply to

    Re: Upload huge files into infoapth form

    Thanks for your help. Since am a new to infoapth development,  I could not able to find the relavent info. could you please help me how to map network/any client path upon clicking the button. I tried with the following approach but helpless., Please have a look on my code and if possibel try to share your approach.

    //below code is working but it is pointing to "Server file path" rather pointing to "local" path.... I dont know how to refer the local path uisng infoapth managed code.

    using

    (ClientContext ctx = new ClientContext("http://myteam123/sites/abc/"))

    {

    Web currentWeb = ctx.Web;

    ctx.Load(currentWeb);

    ctx.ExecuteQuery();

    string Path = this.MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:field4", NamespaceManager).Value;              

    using (FileStream fs = new FileStream(path, FileMode.Open))

    {                

    byte[] byteArray= StreamFile("test",fs);

    UploadDocument1(

    "http://myteam123/sites/abc/", "Shared Documents", "Shared Documents/", "test1", byteArray);  // upload to shared doc.

    }

    }

    Thanks
    Rajesh
  • 03-02-2014 11:46 PM In reply to

    Re: Upload huge files into infoapth form

     I don't do code.

    A mapped network drive would happen as part of a login script i..e like a home drive.

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