Sharepoint 2010: Copy or add file to Document Library - sharepoint

I have a silverlight application inserted in a SharePoint page. The SilverLight application runs on a different server thatn that of SharePoint. From an event in the SilverLight, I generate a document on the server side from SQL Server. I can generate the doc on the server hosting the silverlight application and also copy it to the SharePoint server. I wanted to know if I can include this file in a sharepoint document library automatically. I was thinking if like emailing to a list allows us to copy the file into the library, can we configure the reverse, means copying the file make it part of the list.
Update:
I wanted to avoid uploading. For me uploading is sending the file from one location to the target location. But what I am saying is, if I copy the file into the folder where SharePoint keeps the file physically for the particular list, can it be added to the list automatically?
I am not sure, how well I am being able to describe the point. Please elaborate if required or I can answer your queries.

SharePoint stores the files in a database, not a folder.
WebDAV access may be what you're looking for - it's a backbone of the the Explorer View feature that allows a user to access a document library as if you were accessing a file system through a Windows Explorer window.

You can configure "incoming e-mail" properties for the document library, and assign an e-mail address.
After that, when you e-mail a document as attached to e-mail to this e-mail address, then attachment will be saved to that library by sharepoint automatically.

Related

File system access to Sharepoint document library - only approved items

How could I synchronize as SharePoint (2007) document library to a local folder... but only the 'approved' documents in a library that has content approval set on.
Navigating to it through Windows Explorer (i.e. the WebDAV link) exposes all files, but i can't find any indication in the file system which are approved.
Microsoft Office SharePoint Server 2007. The client will either be Windows Server or a Windows client OS(7, XP)
Windows Explorer view is always going to show you all the files so there isn't going to be a way to make it show a subset of the files. With a tool written to use the SharePoint web services you could access a document library view that only had approved documents showing so you could only download documents that showed up in the view. Alternatively you could query the document library for items that were approved and just grab those.

SharePoint Online file storage

We have a requirement to store documents in SharePoint Online as people copy files to a shared network directly.
Is there a way of automating this? I was thinking of a windows service which will poll the directories, find any changes like new subdirectories or new files, then upload them to a SharePoint Online document library.
You don't have to poll if you use a FileSystemWatcher inside your Windows service for real-time notifications.
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
However, if your requirement is 100% accuracy, you will need to build in some sort of tracking/checksum mechanism to make sure that every document was 1) detected and 2) successfully moved to SharePoint.
You may want to have your service check the delta every time it starts up, and then subsequently only respond to FileSystemWatcher events.
EDIT: Per Tony's question below, here are some additional thoughts on getting files to SharePoint.
First, try a simple test.
1) Copy the URL of a document library within the BPOS SharePoint site. Make sure you're on a machine that has the Office Online sign in app on it.
2) Open Notepad. Type some random text.
3) Click on File -> Save As.
4) Paste the URL.
5) Attempt to save the file.
This works great on "regular" SharePoint (done it many times). If this works with BPOS, it opens up several options.
File System Replication to a SharePoint Online or Office 365 document library is planned to be released with the "Cloud Connector for Office 365". With the current version database content is supported only, but bi-directional with V2.0

Are Sharepoint template files actually stored on the file system?

I'm new to Sharepoint and just starting to poke around with Sharepoint Designer. I'm curious about the file system I see in Sharepoint designer which doesn't seem to appear anywhere else.
When I open a Sharepoint site in Sharepoint Designer, and I see folders for all my lists, and the Web forms created within them -- am I actually looking at the Windows file system? Or are these virtual-ish files that don't actually exist on the file system?
Put another way, when I create a new List in Sharepoint, do a bunch of template files ("AllItems.aspx," "DispForm.aspx," etc.) get written to the file system somewhere? If so, where?
I ask because I searched and I can't find any of the files I see in Sharepoint Designer anywhere on the actual file system.
Deane,
In essence, you're looking at a hybrid view. When you open SharePoint Designer, you're actually looking at a combination of files that exist in two different places:
The local file system of the SharePoint web front-end (WFE) to which you're connected.
The content database (within SQL Server) that houses the site you have open.
Generally speaking, knowing where any given file resides is a function of whether or not the file is customized. Uncustomized files (such as those that are provisioned through site defintions and Features) do, in fact, live within the server file system. If these files should become customized through editing (e.g., through SharePoint Designer), the edited copy ends up in the content database within SQL Server and is tied to the site.
MSDN has a good article describing SharePoint's virtualized file system and the customization process I'm describing (I'm representing it without going into a lot of detail). I'd recommend checking out the article:
http://msdn.microsoft.com/en-us/library/cc406685.aspx
I hope this helps!
I think they are on [server]/wwwroot/wss/virtualdirectoryofyoursharepoint and the information about each list is saved in the database of Sharepoint content.

Accessing Sharepoint File Server Search Results Externally

We are currently implementing MOSS 2007 to replace an older portal system (Plumtree) and are currently looking at searching. We have 1000s of documents on a file server that we would like users to be able to search. This I can set up by adding a content source of "File Shares" and pointing it at the UNC of the file share. The issue is getting access to this data when you are not on the local network.
So, file share is \FileServer01\Files. This has a file called Wibble.txt containing the word Wibble.
When I search for Wibble it finds this document, BUT it points to file:\FileServer01\Files\Wibble.txt.
That is great if I am attached to the network, but what about when I am accessing Sharepoint via the Internet and I'm not on the LAN that knows about that server?
If I wrote something from scratch I would have a download page that I passed in the location of the file and it would stream it to my browser. Sharepoint does not seam to do anything like like.
Ideas? Suggestions? Have I missed something simple?
Create an HttpModule that intercepts requests to documents in this file share, and presents them through an HttpHandler to the user. Deploy the module and handler to the web application.
The only way to make that content accessible via HTTP would be to bring everything off the file server and into the SharePoint content database. You can then simply let SharePoint crawl that instead of the file server; and your users will be able to download content as well.
Edit: To make the migration task quicker and easier, you can ensure that the WebDav service is running on the sharepoint box, which will allow you to open a document library using the windows explorer interface.

How to locate Sharepoint document library source page on the server?

I am working with a Sharepoint document library and I'm trying to locate the source of the document library page. I'm working on the Sharepoint server. I just can't find it, where should it be stored?
Thank you!
SharePoint does not store the pages directly in the filesystem. The mechanism is a little less straightforward.
To understand this mechanism, You have to understand the concepts of Ghosting/Unghosting, and the ASP.NET Virtual Path Provider. The SharePoint stores the pages in the Database as BLOBS, and serves them up using the ASP.NET Virtual path provider.
The ASP.NET Virtual Path Provider provides an abstraction between ASP.NET and FileSystem. Instead of getting a System.IO.FileStream object directly from the filesystem, the provider uses MapPathBasedVirtualPathProvider and the MapPathBasedVirtualFile classes to get the FileStream object.
This abstraction allows ASP.NET to serve up pages from anywhere, without having to store the pages in an actual file system. This concept is used to implement Ghosting/Unghosting which basically means having a single copy of the page, and serving them up as different pages.
SharePoint leverages this new feature in ASP.NET 2.0, along with the improved BLOB storage functionality in SQL Server 2005 to serve up pages.
Your question is not very clear...
Are you refering to the "source" code of the document library pages?
It depends if you have edited them with SharePoint Designer or not. If not they should be located under 12 hive (c:\program files\common files\microsoft shared\web server extensions\12). If any modification were done using SPD2007 the files will be stored in the content database.
...or are you refering to the "source" where the files are stored?
All the files saved in document libraries are stored in the content database as blobs in the AllUserData table.
You the pages appear as 'aspx' pages, they are not stored on the server anywhere as aspx pages. All pages are either stored in the DB as a BLOB, or 'put together' at runtime from information stored in the DB. SharePoint is an odd monster :)
If you are going to edit the look, there are a few options:
SharePoint Designer (I hate this app)
Make another 'web part page' that includes the document library inside of it while changing the content around it (easiest and best approach IMO)
make a specialized web-part (most
difficult)
SharePoint takes a whilet o get the full grasp of... it is strange.
When you create a document library template files from the "12 hive" are ghosted into the SharePoint content database (SQL). The only proper way to edit those pages at that point is to use Microsoft SharePoint Designer.
Open SharePoint Designer and open the SharePoint web site in question and you will see your document library listed in the file explorer. Under your document library you will see a Forms folder, that Forms folder is what contains the source files that are rendered to the browser.
Here is a screen shot:
If I understand what Sacha and Naspinski are saying, when I am creating a new Document library, the look of the page is retrieved from the 12 hive and stored (ghosted?) into the DB. The page is no more stored into the 12 hive, as for each document library I will have a somehow "customized page". Is that true?
There are two types of pages in SharePoint2010.Application page and site page.SharePoint store application page directly in File system.For site pages , if the page is in a ghosted state , the page in stored in the file system.If the page has been customized,the file is then stored in the content database.

Resources