Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Where did a downloaded file from SharePoint come from?

When a user clicks a link in SharePoint to open a file which has registered extension to start a program it seems to follow this flow -Browser downloads the file to a temporary location -The shell then looks to see what the exaction for the file is -Starts the program with the downloaded file path as the first argument to the starting program.

My question is this how can I know where to save this file back into SharePoint?

How does Word or Excel capture where in SharePoint the file came from? I would like to put into the program I am working on SharePoint integration. Any help would be appreciated.

Thanks!

share|improve this question

migrated from stackoverflow.com May 5 '12 at 1:50

This question came from our site for professional and enthusiast programmers.

1 Answer 1

It all depends on the application that downloads/opens the documents.

First of all, when you click a document link in SharePoint (via the Browser) SharePoint will send the document back with the correct mime type (assuming it is registered and known). Depending on the settings of the Web Application (strict vs permissive file handling) not default known document types (such as pdf) will be downloaded to the browser file cache folder on the local client - from where you then can open it. That is the document is opened from the local drive and have no connection to SharePoint at all. To update that document, you need to upload it to SharePoint once again.

If the document is of a known and safe type (once again the Web Application strict vs permissive file handling comes into play here) the client application will be openend. Also for known applications such as the Office suite (Word, Excel, PPT etc) and the new Adobe Acrobat/Reader X the application itself will download the document from SharePoint, using the WebDAV protocol (standard HTTP GET, PUT, POST commands), and therefore maintaining the connection to SharePoint. So saves will be directly to SP using HTTP POST commands.

As a side note Office 2010 has something called the Microsoft Office Upload Center, this is a client application that allows Office programs to save the files to disk directly and then the Upload Center asynchronously do the HTTP POST to SharePoint. This is much faster - compare saving 10MB PPT to SharePoint and disk. Also the Upload Center takes advantage of the MS-FSSHTTP protocol which enables the Upload Center to only upload the "changed" bits of the documents - but that's another history.

share|improve this answer

Your Answer

 
discard

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