Temporary folder / Location for SharePoint

I added a menu item to the ECB document library documents. When I click this menu, I want to copy this document to my application. To do this, I need to create a temporary document file on the same computer on which the SharePoint server is installed. Now the problem is where should I create a temporary file. One solution is the TEMP folder of the current user (who signed up for sharepoint). But in sharepoint, users from Active Directory can also log in, but the temporary folder is accessible only to users on this computer. In short, you need to create a temporary file in a folder where every user (users on this computer, as well as AD users) have the rights to create and delete the file.

Does sharepoint recommend a specific location for this purpose?

+4
source share
1 answer

SharePoint uses .NET, so for this you need to use .NET functions:

string tempFilename = System.IO.Path.GetTempFileName(); 

The TEMP service account will be used, not the registered user.

-Oisin

+4
source

Source: https://habr.com/ru/post/1285721/


All Articles