Adding HttpHandler to SharePoint 2010 to rename PDFs on download

I have been looking around for awhile now and I can't seem to find an up to date example and my current knowledge of SharePoint as a whole is fairly minimal. What I need to do is append a column from a document library as well as the last date modified to PDFs as they are downloaded. As far as I can see there isn't a built in way to do this with SharePoint and the way to go is to produce an HttpHandler that changes the file name before it is downloaded.

Link

I found this which is a good start and adding the code to manipulate the file name seems straightforward, but where I get stuck is actually creating the proper files and deploying it to SharePoint.

Any suggestions or examples would be much appreciated.

Answers


What you need to do is to packade your VisualStudio SharePoint project (features, packages etc.) in to a .wsp file. A .wsp file is simply a zip file that contains your artifacts that are going to be deployed to the hive (14 folder).

I would recommend you to use CKS Dev where you can in an easy way create the wsp. It is an open source plugin to VS 2010 found on code plex. CKS Dev on CodePlex

Next step is to copy this wsp to the server where it needs to be installed. And then issue some powershell commands on the server to install your code. Here is a link taking you through the steps of deployment

So in short: 1. Create wsp 2. Copy wsp 3. Install wsp on server

I hope it helps. Good luck.


Need Your Help

How can I view more than one version of IE on my computer?

internet-explorer internet-explorer-6 internet-explorer-7

Where I work we only have IE 7. I want to view IE 6 on my computer also.

Unable to find running application in Cocoa

objective-c macos cocoa process nsworkspace

I am getting the list of running applications in Cocoa with the following code: