SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are currently deploying all static files (images, js, css) with a Module project in Visual Studio. So all files will be served like this: /_layouts/files/js/script.js

This seems to work well, but how can a user with correct permissions now delete/create/edit these files? Now we just redeploy the project, but when our application hit prod redeploying will not be as simple, and some of the static files (such as sprites) might be frequently updated.

share|improve this question
up vote 2 down vote accepted

If these files will be updated frequently, or updated by end users, then the best place to store them is in SharePoint and not on the file system.

share|improve this answer
Can we inject them somehow? We have quite the set of files, and we have a "deployscript" which will deploy all projects and create all lists etc. for first time deploy, can we store them in SharePoint through our deployscript? – eirikb May 28 '10 at 9:07
You can do whatever you like, have a look at – Muhimbi May 28 '10 at 11:05
So I need to add each file to the XML then? Well, that would work. And links? They will stay the same? (We hard code links in masterpage and some other places) – eirikb May 28 '10 at 14:42
According to the tag you are using SharePoint-2010. If you are also using VS2010 then I am not sure what the best way is to do this as I am not familiar with the new SharePoint functionalities in VS2010. However, if you are still in VS2008 then you may want to consider using WSPBuilder – Muhimbi May 28 '10 at 17:51
I'm using VS2010, and just creating a Module where I append the files. Works great, thanks. The only problem now is how to let my <module> create folders within Style Library – eirikb Jun 11 '10 at 12:54

You can deploy files either to the layouts folder (as you are doing) In that case only administrators can modify them (and shouldn't, they should be changed by deploying a new solution) or you can deploy them to the SharePoint Virtual File system. In that case you need to make user of modules:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.