Using the Image Upload Web Part

Once the Image Upload Web Part is installed in a SharePoint farm, it is used like all other Web Parts. A site member (a user with permission to change a Web Part Page) can add the Image Upload Web Part like any other part. By default, the Web Part is listed in the Miscellaneous section of the Add Web Parts dialog.

AddWebPart.jpg

When the Web Part is displayed, it will check for the location configured to store the images that are uploaded. This location is set via the STSADM command line utility, using a custom option that is included in the download.

LocationNotSet.jpg

Once the web part has been added to the page, it is no longer necessary to keep the page in edit mode. If the page is stored in a document library that requires check out, keep the page checked out until the image is uploaded and display.

In the image below, the help text for the command is shown. At the bottom of the screen is a sample command to set the location to a picture library named “ImageUpload.” This library (either a document library or picture library) must already exist.

SetLocationHelp.jpg

Once the upload location is set, the web part will display the upload form. (The page may need to be refreshed.) The form provides text boxes to specify the image to upload, the alternate text to be displayed (usually as a tool tip) and the height and width at which to display the image. (The height and width are optional. If they are not specified, the image is displayed at its full size.

SelectImage.jpg

Clicking the Browse button on the form will show the Choose File dialog box. This dialog will allow the site member to navigate to any location available from their computer. This can include local directories, network directories and even camera memory cards. The valid image file types are .bmp, .jpg, .gif and .png.

ChooseFile.jpg

Once the image is selected and the form completed, the Save button will upload the image to the configured location, and the web part’s properties will be updated with the url of the image. Then, the web part will render in its normal manner — displaying the image.

BestPractices.jpg

Viewing the details of the image in the picture library will show that is was created by the “System Account.” This is a special account that automatically has write permission to the library. This account is only used when a custom program runs under elevated privileges to perform an action.

Installation

Home

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

Comments

No comments yet.