Friday, May 16, 2008

My first custom type, well second Enhanced image for sharepoint 2007

This is a sharepoint 2007 custom type that enhances the functionality of the out of the box "Hyperlink or Picture" type. It basically allows, once added to a list, the ability to upload a picture from the custom list via open dialog box, avoiding the tedious task of uploading the picture to a picture library then copy the url and then paste the url into a "hyperlink or picture”. So instead of having a two step process you can upload a picture directly to a the custom list generate a thumbnail to show on the list view and if click on the thumbnail a popup with the real size picture will show. This was my first attempt of creating a SharePoint custom type so once i publish the code here ill appreciate any comment in order to improve it.
So if you want to know how everything works, take a look at the video.

So now you can upload pictures to your custom list or document library without the pain of uploading the files somewhere else and then copy the URL.

Currently I have a couple of problems but its fully functional, the first one is that attachments needs to be disable on the list not for Document libraries but for Custom lists, the second one is that you need to have at least one picture library in your site.I’m not going to explain how to deploy the WSP but it’s at codeplex so enjoy.
So if you want to know how everything works, take a look at the video.


Mike Etheridge said...

If you are using MOSS, all you have to do is add an existing column to your List of type "Page Image".

Guillermo said...

yes you can do that but previously have to upload the picture to a picture library.
We i did here is to avoid having the user create a picture library and upload the picture there and then go to the list and reference it. I just wanted to make it easier for the users. Not everyone is like you or me.

Walker said...

Nice work. It works great. It's be great learning experience for me. But it does not work under https. The PicturePicker returns "The request failed with HTTP status 401: Unauthorized.". Does it work in https? or I'm missing some setup. Thanx.

arg said...

Great feature,
I have only one problem with saving the images.
All images (with same name) are overwriten now, so if i upload an image called 1.jpg and i post another also called 1.jpg it overwrite the first one.

How is it possible to give every image a unique name so no image is overwriten. for example a timestamp before/after the name.

How is such a thing possible i can't get it to work without overwrite a image with the same name.

launchpaad said...

Can you give me the youtube address for your video? It's too blury, I can't see the links.