InfoPath form to upload an image to SharePoint (no code)

Learn how to create an InfoPath form that can upload an image to SharePoint using a web service data connection and rules (no code).

ADVERTISEMENTS

In a previous article, I showed you how you can create a custom SharePoint Designer workflow activity to upload images from InfoPath to SharePoint. While that was a SharePoint 2007 article, you could do the same in SharePoint 2010.

InfoPath SharePoint integration can be implemented in several ways. You can integrate InfoPath 2010 with SharePoint 2010 through SharePoint web services, SharePoint workflows, SharePoint event handlers, or by writing code in InfoPath forms that makes use of the SharePoint client object model or the SharePoint server object model.

Where the two latter means of integration are concerned, you will always have to give your form Full Trust to be able to call those two object models.

If you do not want to write code to integrate InfoPath with SharePoint, your best bet is to explore what the SharePoint web services have got to offer.

Where the uploading of images are concerned, you can either write code to upload images to SharePoint document or picture libraries, or you can use one of two web services: 1. SharePoint Copy web service, or 2. SharePoint Imaging web service without having to write code.

Both SharePoint web services offer similar functionality, however, the Imaging web service can be used to upload an image to a SharePoint picture library, while the Copy web service can be used to upload an image to any SharePoint document library.

In addition, if you want to create an InfoPath form that can upload one image to a library, you do not have to write code to get such functionality, and you can use either the Copy web service or the Imaging web service to do so.

Because the Copy web service is a bit more involved than the Imaging web service, this article shows you how to use the Imaging web service to upload an image from an InfoPath form to SharePoint. However, the same techniques you use for hooking up the Imaging web service to an InfoPath form using an InfoPath data connection and rules, would apply to the Copy web service.

In the following 4-minute InfoPath 2010 tutorial video, I show you how easy it is to use rules to connect an InfoPath form to SharePoint's Imaging web service to be able to upload an image to a SharePoint picture library using an InfoPath browser form or Filler form.

 


Related Posts

 

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.

InfoPath 2013 Cookbook: 121 Codeless Recipes for Beginners

InfoPath 2013 Cookbook 2: 121 Codeless Recipes for SharePoint 2013

InfoPath 2010 Cookbook: 101 Codeless Recipes for Beginners

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010

InfoPath 2010 Cookbook 3: 101 Code Recipes for C# Developers

InfoPath 2010 Cookbook 4: 101 Code Recipes for VB Developers

InfoPath 2010 Cookbook 5: Integrating InfoPath with Excel and Excel Services