Category: Upload Webparts

Custom Field – Upload Files and Images

If you know my WikiWebpart or DiscussionListUploader, you know that there are some occasions where you want to upload a file, and place a link to it to another field.

The above solutions are only for the certain list type.

My new custom field can be used on every list or library!

image

Just add the field to one of your lists/libraries:

image

It will automatically try to find local libraries for documents and images to store the uploaded files and images.

One of the available list fields will be used to insert the link. That field has to be a Rich Text field! And if you want to upload and insert images, it has to be an Enhanced Rich Text field.

The great advantage of the field is, that it will be displayed when you create a new item, or edit an existing. If you view an item from the DisplayForm, the field will not be shown. And yes, it will work for new Wiki Pages!

image

 image

An Update Check is implemented as in most of my solutions. That way you can always see if there is a newer version of the field available on my blog.

The field is localized for German and English.

Installation

  1. Make sure you have the .NET Framework 3.5 installed
  2. Add the solution with “stsadm –o addsolution –filename RH.UploadAndInsertField.wsp”
  3. Deploy the solution in your Central Administration

Download:

RH.UploadAndInsertField.wsp

RH.UploadAndInsertField-Source.zip

Update 24. March 2009

Fixed a bug if the field was used on a rootWeb

 

Update 13. July 2009 – Version 1.0.2.0
Inserted links are now relative

Update 30. June 2009 – Version 1.0.4.0
Now works as a site column

Update 06. September 2009 – Version 1.0.5.0
Fixed Bug where links for rootwebs were invalid

Update 06 Februar 2010 – Version 1.0.6.0
Fixed Bug where viewing the list in DataSheetView would fail

Upload documents/pictures to a discussion lists

You might already know my Wiki Webpart, which allows you to upload pictures and documents to a Wiki while editing it.

What is it?

With this Solution you can upload images and documents from the new/edit form into existing picture/document libraries. After the file has been uploaded, a link will be inserted into the Body.

This is either a <img> or a <a> tag, depending on the uploaded file.

How does it work?

After uploading the image/file, it will be put into your Body via JavaScript. There is no reload of the page required.

Requirements

.NET 3.5 (SP1) on all of your frontend servers

Installation

The DiscussionListUpload comes as a SharePoint solution (wsp file), which will be installed on your SharePoint farm via "stsadm -o addsolution -filename RH.DiscussionListUpload.wsp".

The solution contains one feature, which has to be activated on site collection level.

After the feature has been activated, discussion lists will have a new link in the list properties.

If you click on the link, it will bring up a settings page for the feature.

Enabling the feature in the properties will add the Webpart to the NewForm and EditForm of your discussion list. Disabling it, will remove the Webparts.

Update:

Instead of this solution you can use my Custom Files and Images Upload Field.

If you want to use it, please make sure you disable this feature on the discussion list and on your sitecollection.

Download

Download Solution

Download Source code

Technorati Tags: ,

Wiki Webpart 2.0

The next generation Wiki Webpart is there! Sounds good J The (stupid) name remains, but the core has changed.

What is it?

With the Wiki Webpart you can upload images and documents from a Wiki edit page into existing picture/document libraries. After the file has been uploaded, a link will be inserted into the Wiki Content.

This is either a <img> or a <a> tag, depending on the uploaded file.

How does it work?

After uploading the image/file, it will be put into your Wiki Content via JavaScript. There is no reload of the Wiki page required any more.

Why can’t I upload files when I create a new Wiki Page?

Because MS decided to change the normal "NewForm" behaviour in Wiki libraries. Unlike in lists/document librariew a new item is created through "_layouts/CreateWebPage.aspx" and not the NewForm.aspx. And since this one is not unique for the Wiki library, I can not adjust it.

Requirements

.NET 3.5 (SP1) on all of your frontend servers 

Installation

The Wiki Webpart comes as a SharePoint solution (wsp file), which will be installed on your SharePoint farm via "stsadm -o addsolution -filename WikiWebpart.wsp".

The solution contains two features.

One has to be activated on site collection level (it will allow you to use the Webpart).

The second feature has to be activated on each web, where you want to use the Wiki Webpart.

After the features have been activated, there is a new entry in the General Settings of a Wiki library.

Enabling the Webpart in the Wiki properties will add the Webpart to the EditForm of your Wiki library. Disabling it, will remove the Webpart. There is no need to add the Webpart with the console application anymore!

Upgrade from previous version:

If you already have an older version installed, the installation steps are similar.

  • stsadm -o upgradesolution -filename RH.WikiWebpart.wsp -name RH.WikiWebpart.wsp -immediate –allowgacdeployment

After upgrading the solution, you have to retract and redeploy it in the central administration. This step is necessary, because the features within the solution have changed!

Update 30. Nov 2008:
A small bugfix release.

Update:

Instead of this solution you can use my Custom Files and Images Upload Field.

If you want to use it, please make sure you disable this feature on the wiki, the web and on your sitecollection.

Download

For all the (security) guys who wanted the source code, you can get it now.

Download solution

Download source code

 

Tags:

Updated WikiWebpart

Since so many people asked for support to upload documents as well, I have implemented this functionality into my WikiWebpart. Now you can add pictures and files directly into your wiki by uploading them from the clients.

As always, you have to install the solution, and activate the WikiWebpart feature for you Sitecollection as described in Updated WikiWebpart + Tool to install it.

The Webpart will detect an existing picture and document library, and use it. If you have multiple libraries on your website, you can configure which one to use in the Webpart properties.

Note: This version of the Webpart will install itself into the GAC.

  • Download WikiWebpart Solution
  • Download AddWikiWebpart Tool
  • Updated WikiWebpart + Tool to install it

    I updated my WikiWebpart. You can now download it as a SharePoint Solution.

    Steps to install the solution:

    1. Install the solution via "stsadm -o addsolution -filename RH.WikiWebpart.wsp"
    2. Go to your "Central Administration > Operations" and deploy the solution

    3. Active the Feature for your Sitecollection
      Go to "Site Actions > Site Settings > Site Collection Administration > Site collection features" and active the feature
    Add the Webpart to your Wiki library

    Now you are done. You can add the Webpart to any Wiki library you like. To make this process easier, I wrote a little tool for it. You call it with the weburl and the Wiki library name as parameters.
    RH.AddWikiWebpart.exe http://sharepointurl/somewikipage "Wiki Pages"

    Done.

    One more note. Right now the Webpart only displays english text. When I find a solution to add the resource assemblies for german, I will update the Webpart.

    If you have previously installed the Webpart manually, remove it from all Wiki library EditForm.aspx, from the Webpart gallery, and from your web.config and bin folder.

    Update:

    Multilanguage Support is back 😉
    You can download the solution and update it via
    "stsadm -o upgradesolution -name RH.WikiWebpart.wsp -filename RH.WikiWebpart.wsp -immediate"

    Update 23. Apr 2008:

    I have released a new version. Bugfixing only.

    Update 5. Jul 2008:

    A new version with support for uploading files additionally to pictures.

    Updated Wiki Webpart

    Please use my custom field type. It is more flexible –> http://www.hezser.de

     

    I updated my Wiki Webpart. For all of you who don’t know what it does:

    The normal Wiki Edit Form misses the ability to upload pictures. My Webpart, which has to be included to the EditForm.aspx, allows you to upload a picture. It also creates a link in your Wiki post, which displays the uploaded image.

    This release of the Webpart is multi lingual. Meaning it will present text to the user in english and german. If you would like this Webpart in your language, drop me a note 🙂

    Installation steps:
    (If you need help: look here)

    1. copy the dll to the bin folder of your SharePoint virtual server
    2. create an entry in the safecontrol section of your web.config
      <SafeControl Assembly="WikiWebpart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b17a955c3eada4c1" Namespace="WikiWebpart" TypeName="*" Safe="True" />
    3. change the TrustLevel in the web.config to either "WSS_Medium" or "Full"
    4. add the Webpart to the Webpart gallery of your sitecollection
    5. modify the EditForm.aspx of your Wiki Page with SharePoint Designer, and add the WikiWebpart beneath the standard EditForm Webpart
    6. you are ready to use it 😉

      Download the Webpart

    Update 23. Apr 2008:

    I have released a new version. Bugfixing only.

    Wiki mit Bildern Update

    Falls bei der Benutzung des Webparts ein Fehler wie:

    Fehler bei der Anforderung des Berechtigungstyps Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.

    auftritt, muss der Trustlevel in der web.config auf Full gesetzt werden.

    <trust level="Full" originUrl="" />

    Zum vollständigen Beitrag: http://www.hezser.de

    Update 23. Apr 2008:

    Ich habe eine neue Version bereitgestellt.

    Wiki mit Bildern

    Bei einem Blog Eintrag kann man Bilder mit an den Eintrag anfügen. Dies ist jedoch bei der Wiki Vorlage der Windows SharePoint Services V3 nicht möglich.

    Um dieses Manko zu beseitigen, habe ich ein Webpart geschrieben. Dieses wird in die editform.aspx der Wiki List eingebaut. Danach kann man bequem über die Pflegemaske der Wiki Einträge Bilder an einen Wiki Beitrag anfügen. Die Bilder werden automatisch in eine Bildbibliothek hochgeladen.

    Installation:

    1. Kopieren der Assembly in das bin Verzeichnis des virtuellen Servers
    2. Registrieren des Webparts in der web.config
      <SafeControl Assembly="WikiWebpart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b17a955c3eada4c1" Namespace="WikiWebpart" TypeName="*" Safe="True" />
    3. Hinzufügen des Webparts auf der editform.aspx (mit dem SharePoint Designer)
    4. Erstellen einer Bildbibliothek in der Wiki Site
      Wenn Sie mehrere Bildbibliotheken auf der Wiki Site haben, kann in den Webpart Eigenschaften eine Bildbibliothek eingetragen werden.

    Hinweis:
    Wenn ein Bild angefügt wird, wird der Beitrag nicht gespeichert. Deshalb immer erst ein Bild hochladen, und dann den Beitrag bearbeiten!

    Download: WikiWebpart

    Update:

    Falls bei der Benutzung des Webparts ein Fehler wie:

    Fehler bei der Anforderung des Berechtigungstyps Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.

    auftritt, muss der Trustlevel in der web.config auf Full gesetzt werden.

    <trust level="Full" originUrl="" />

    Update:
    Ich habe eine neue Version des Webparts veröffentlicht. Siehe hier.