Question

Salvete! Is there a way in Sharepoint to have a file be uploaded to a location in a custom virtual directory instead of sharepoint?

I have about 120 users, all of whom need to deliver to our server monthly files ranging anywhere from 7mb to 500mb. I am only using SQL Express (limit of 10gb) so that will fill up very fast.

I am thinking that I can create a virtual directory (in iis7) inside my portal project that links to a particular directory, like D:\mydir, and inside of that directory, there will be a folder for each of my 120 users, with AD permissions set for those users only.

Is it possible to make sharepoint move files into those directories, or would it be too difficult to make a custom web part (which I have never done) that provides the uploading capability for them?

Using this directory could save my sql space, and make it easier for large files to be stored on the server. Then I could run an application on the server to delete files older than 30 days. It would also make it very easy for my home team to get to those files via unc share.

[update] Here is a solution that I am trying out: I put a custom uploader aspx page in a page-viewer web-part. This will let me upload the file directly to the file-system. It will require some other code, however, to add a reference to sharepoint to indicate the action was performed (logging it in the list). Here is the link: http://msdn.microsoft.com/en-us/library/aa479405.aspx

However, I need to get a slice of the parent page's url; here is the stackexchange thread, if you want to assist me! How to get the url name of a subsite from a webpart?

I haven't accepted any answers yet because I still need to try out Oyshik Moitra's idea too. I am only posting my own in order to show some progress.

Was it helpful?

Solution 4

Here is what I finally worked out: I put a custom uploader aspx page (using NeatUpload) in a page-viewer web-part. This will let me upload the file directly to the file-system, bypassing Sharepoint's database altogether.

OTHER TIPS

The simplest solution would be to use remote blob storage to move the file content out of SQL to actual disk storage. AvePoint DocAve Extender is free. See http://www.prweb.com/releases/2010/03/prweb3743974.htm on how to get the free license.

You can create a customm web part the uploads the file to a normal folder, and another web part to show the files in a proper structure (Folders / Tree like).

But doing this prevent you from using the ready-made features in SharePoint.

Did not get the exact requirement (i.e security and accessibility etc) but if the main aim is just to move the files then you can try to do something like this:

  1. Create a document library to store the files so the user can come up and upload it just the way as he would if the file were to be stored on the server. There is no coding required in this step.

  2. Attach an eventhandler to the library or create a timer job that will silently move the files from the folder to physical folder in question. For this you need not create a virtual directory. You can also attach the physical path to the document library list item so that at later point of time if the user wants to revisit his document then you will know where exactly to pick it from.

For info on how to create a:

  1. EventHandler visit http://msdn.microsoft.com/en-us/library/ms437502.aspx
  2. TimeJobs visit http://msdn.microsoft.com/en-us/library/hh528519.aspx

Hope this helps.

Cheers

--OM

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top