Installation

To install the Image Upload Web Part, the following are required:
  • Console access to the web front-end server.
  • A Document Library or Picture Library for storing the uploaded images.
(Since all site visitors of the page containing the web part will need to view the image, the library must allow read access to all accounts in the site collection. Anonymous access will also work, if the web application is configured to allow anonymous browsing. In addition, the library must not be configured to require check-out of documents. The upload processing of the web part does not support check-out and check-in.)

The Image Upload Web Part is installed using a SharePoint Solution package (.wsp) file. The STSADM command line utility is used to install and deploy the solution.

      stsadm –o addsolution –filename "Image Upload Web Part.wsp"
      stsadm –o deploysolution –name "Image Upload Web Part.wsp" 
             –url [web application url] –allowcas –allowgac  


Since the web part will use elevated privileges to upload the image, a custom Code Access Security (CAS) Policy is used to grant the web part the appropriate run-time permissions. This policy is added to the CAS policy in effect in the specified web application. To allow this update to happen, the allowcas parameter is required.

As noted above, the solution contains an extension to the STSADM command for setting the image storage location. The SharePoint platform requires extensions ot STSADM to be deploy to the Global Assembly Cache (GAC). Thus, the allowgac parameter is required when deploying the solution package.

Using the Image Upload Web Part

Home

Last edited May 14, 2008 at 1:47 AM by PaulSchaeflein, version 3

Comments

No comments yet.