SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Saturday, July 23, 2005

Update: The Image Upload Web Part has been updated.

Heather Solomon blogged about end-user-focused web parts. (Be sure to look at the comments for links to many others.) All are very valid points.

I have a small but helpful contribution: The ImageUpload Web Part.

On a WSS Team site, the default template has an Image Web Part that displays the Windows Logo. I have never seen this logo on a production site. To change the image is easy enough for users familiar with the Web Part page model: Open the tool pane and change the location of the image. This is where it gets difficult for end-users.

What if the image is on the end-user's computer? Most likely, they email the file to the webmaster/developer. It is then uploaded to web server and the URL emailed back to the user. (Or the webmaster/developer is updating the web part.) More industrious users will post the image to a photo gallery. Some will even determine the URL. But there is an easier way.

The ImageUpload Web Part displays a form with a file upload input box. The end user can click the browse button and select the image. The web part stores the image in a document library and automatically remembers the location (URL) and renders the <IMG> tag correctly.

Download the CAB file and source code.

The web part requires a setting in web.config with the location to store the images. And, the end user must have permission to store items in that library. (This second restriction could be alleviated using impersonation techniques from Todd Bleeker or Victor Vogelpoel or Jay Nathan.)

Tuesday, July 26, 2005 3:06:09 PM (Central Daylight Time, UTC-05:00)
Can this be incorporated into the content editor as well?
Bill B
Tuesday, July 26, 2005 8:20:41 PM (Central Daylight Time, UTC-05:00)
Not likely. The Content Editor, as all web parts, is sealed so cannot be derived from. That would be an interesting project -- wrapping a rich-text editor with an upload box...
Paul Schaeflein
Friday, July 29, 2005 4:36:46 AM (Central Daylight Time, UTC-05:00)
I have installed the ImageUpload webpart in my WSS site.
When I place the webpart on my page, I can browse to an image.
But when I click the save button, nothing appears.
I'm logged in as Administrator, and have some document librarys and picture librarys.

What do I wrong?
Leon Baudewijns
Saturday, July 30, 2005 6:58:50 PM (Central Daylight Time, UTC-05:00)
1.) Does the image exist in the location that is specified in web.config?

2.) In the Tool Pane, is the image URL correct?
Paul Schaeflein
Wednesday, August 31, 2005 7:11:08 AM (Central Daylight Time, UTC-05:00)
I have nothing changed in the web.config, i did'nt know.
What must i change in the web.config, to get this webpart working?
Thanks
Leon Baudewijns
Wednesday, April 19, 2006 11:00:19 AM (Central Daylight Time, UTC-05:00)
What configuration needs to be set in the web.config ?

Can this be moved to the DWP file with a default instead of the web config ? I'd be willing to make the changes tot he code and post them back if you are interested...
Saturday, May 20, 2006 7:55:22 PM (Central Daylight Time, UTC-05:00)
Here's an easy method I have used: open the Sharepoint site with Windows Explorer via My Network Places (use the Add Network Place link to add the site). Windows Explorer opens it (using WebDAV) and you see a normal Explorer view of the top-level folders. One of these is named "images". Just drag your graphic file in here. You can now refer to it within web parts in your site in exactly the same way as the default Windows logo.
Thursday, September 20, 2007 3:35:49 PM (Central Daylight Time, UTC-05:00)
Can someone provide a sample Web.config of what is need to get the web part working.

Anyone try the web part in MOSS?
ben
Tuesday, April 01, 2008 4:20:24 AM (Central Standard Time, UTC-06:00)
Hi could someone post the web config line in which i can change the image location.
Tuesday, April 01, 2008 4:37:21 AM (Central Standard Time, UTC-06:00)
also how do you install it? please email at richard.dennett@brookfield.hants.sch.uk
Comments are closed.
Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008, Paul Schaeflein

Send mail to the author(s) E-mail