I have added a menu item in ECB of document of document library. On click of that menu i want to copy that document to my application. For this purpose i need to create a temporary file of the document on the same machine where SharePoint server is installed. Now the problem is that where should i create the temporary file.
One solution is TEMP folder of current user(who has logged in sharepoint). But in sharepoint, Users from Active Directory can also login but temp folder is only available for users on that machine.
In short requirement is to create temporary file in a folder where every user (users on that machine as well as AD users) have rights to create and delete file.
Does sharepoint recommend any specific location for this purpose?
SharePoint uses .NET, so you should use .NET features for this:
string tempFilename = System.IO.Path.GetTempFileName();
The service account's notion of TEMP will be used, not the logged-in user's.
-Oisin
Related
Here is my requirement:
I want to create a folder called "My Documents".
This folder will share with multiple members, they have access to add, edit and view documents.
But the condition is that they can see their documents themselves and the document should not show to other members.
For example: Suppose user1 and user2 both have access to the folder "My Documents." If user1 creates doc1 only he can see the doc1 user2 can not see the user1's document. I mean Folder "My Documents" will be shared but space should be private.
In general SharePoint lists have item level permission and Document libraries don't have such facility available through UI but you can achieve this using PowerShell.
please follow : https://www.sharepointdiary.com/2014/03/set-item-level-permission-options-in-document-library.html
Note - The settings enabled through PowerShell applies to all documents inside the library not for any specific folder. And the settings are not applicable for Site owners and administrators.
This is not possible using the setup you have done so far. When you grant access to folder, all the files within that folder can be accessed by all users who have permissions on folder.
So, in general you have to grant unique permissions at file level instead of folder level so that other users will not have access to files.
Beware of the SharePoint limitations related to unique permissions in library. It is recommended to design library to have as few unique permissions as possible and remain below 5,000 in total.
Source: Unique security scopes per list or library
Granting unique permissions on multiple files/folder will be problematic to manage in future.
My recommendation:
If you are creating site/library structure from scratch, create separate document libraries (preferred) or folders for different set of users (maybe based on SharePoint/M365 groups than individual users).
I'm trying to create a custom master page template in a SharePoint Online environment. I'm using the Design manager to upload the design files. I've mapped the network drive like the page described and can open and view the files, but I cannot upload files to the location. Every time I try I get the following error:
Error 0x800700E0: Access Denied. Before opening files in this
location, you must first add the website to your trusted sites list,
browse to the website, and select the option to login automatically.
I've added the site to the trusted sites list, as well as selected the option to login automatically. The WebClient service is also running.
How can I upload files to this location?
The only explanation I can think of is that I am logged into windows on a Microsoft account, and I use a different Microsoft account for SharePoint. I can map the network drive fine, but when I try and map it with the option "Connect using different credentials", and I use my SharePoint Online account, I get the same access denied error.
Thanks
Check permissions for the document library/folder in which you're trying to write files. Folders like _Layout which resides at root level sometimes do not allow access of write. Global administrators have full access to these folders but tenant or site collection administrators may not have its access.... For example try opening this link in browser https://yoursharepointsite.com/_layouts/15/fonts this is where font files are like Arial.ttf or Comic sans.ttf So if you want to add new font to your sharepoint online themes you'll have to add files here.
Do this open SP Designer -> open main site -> browse left side menu for your folder and try copying something. If you can copy files there you should be able to copy through your mapped drive.
Also when you mapped drive in Windows Explorer didn't it ask for credentials, where you had to give in your Office365 login email then it can't be an issue of your windows credentials messing up with anything.
In this circumstance, it was actually the Trusted Sites that I had added. I added 'mysite.sharepoint.com' as well as '*.sharepoint.com' to my trusted sites. As soon as I also added: '*.lync.com', '*.microsoftonline.com' and "*.outlook.com", I had no problems writing to the directory
I am interested in making a web for a creating a folder structure with acl in a Microsoft AD Domain, the process would be the following:
The user log in to the web (best with credentials of Windows user)
Authorized users give the name of the folder (in this case the name of the project)
A structured folder is created with the correct ACL
Also I need the option to move the folder to another location and remove/rename the folder
I don't know what is the best option, and more compatible to do this, I'm a bit lost for start googling
Working on windows store apps:
I am trying to access the files and folders of office365 documents library.
I can access the one drive documents as described in this link Common file tasks using the Office 365 client library
But it do not provide a way to access the files and folders in other than onedrive document library.
e.g [https://my-office365-tenant.sharepoint.com/mysite/mydocumentslibrary]
However i had tried a way and it do get the files and folders other than onedrive.
I had not used any capability i created SharePointClient as given below:
var client = new SharePointClient(new Uri("https://my-office365-tenant.sharepoint.com/mysite"),
async () => await AcquireTokenAsync(AuthenticationContext, "https://my-office365-tenant.sharepoint.com"));
IPagedCollection<IItem> items = await client.Files.ExecuteAsync();
In this way i get the files of default "Shared Documents" document library inside "mysite", but i want to get the files and folders of another documents library "mydocumentslibrary" inside same site "mysite".
Can anyone please guide me how to do that or am i missing something? or there is anyother way to do this using office365 api only.
I just went through the documentation of this new API, it seems the file operation is limited to the one drive, I doubt you can get file in another document library.
To get files in other document library, as you're developing windows store APPs, you can SharePoint mobile object model or REST APIs:
Overview of the SharePoint 2013 mobile object model
Get started withthe SharePoint 2013 REST service
The APIs allows access only to default document library. Example:
OneDrive for Business: https://{tenant}-my.sharepoint.com/_api/v1.0/me
SharePoint sites: https://{tenant}.sharepoint.com/{site-path}/_api/v1.0
i'm new to SharePoint Server 2010 and i need to implement this scenario, i need to create a new product folder within a document library after this done sub-folders must be created within this folder with permissions, which means these sub-folders must have permissions to enable groups of users to view it for example or full control permissions.
is it possible to implement this scenario ?!!
thank you
You can create EventReceiver project via Visual Studio 2010. Attach it to new item creation event. You should implement custom logic to check if this item is folder for a new product and then create needed sub-folders and set permissions for it programmatically.