Hot answers tagged

3

I'm grasping at straws here, there isn't a lot of information on the topic about this. I did stumble upon a post that may give clues as to why it is happening and perhaps a work around: SPFile.MoveTo(), at first glance, looks to be a very straightforward method where a file can be moved from one folder to another. Trying to use it and have an ...


2

I figured it out. You can use SPFile to check if the file exist in the library and then move it if it does. SPFile file = site.GetFile("/Final Candidates/" + CName); if (file.Exists) { file.MoveTo("Draft Candidates/" + CName, true); } Reference: http://stackoverflow.com/questions/359672/how-to-determine-if-a-file-exists-in-a-sharepoint-spfolder


1

Try This, Declare a Client context ctx and get your list/library name: RoleDefinition roleDef = ctx.Web.RoleDefinitions.GetByType(RoleType.Reader); RoleDefinitionBindingCollection roleDefBinding = new RoleDefinitionBindingCollection( ctx ); ctx.ExecuteQuery(); roleDefBinding.Add( roleDef ); CamlQuery query; query = ...


1

AFAIK, nothing in the client-side API can allow this. However, there's an old technology called "Front-Page RPC" (the name itself shows you how old it is!) that may be still available on SP2013 (even if it's kind of deprecated/not really documented). It is still there since it's used by Office applications to communicate with SharePoint. FP RPC is a ...


1

I found an answer here. Users with contributor permissions are prevented from uploading files with the following extensions: ASPX; MASTER; XAP; SWF; JAR; ASMX; ASCX; XSN; XSF; So my problem is in "aspx" extension of file I'm trying to create. This could be fixed by removing 'aspx' from WebApplication.WebFileExtensions ...


1

SPListItemCollection is a collection of SPListItem. Get File object from SPListItem. Example: foreach (SPListItem item in items) { SPFile file = item.File; }



Only top voted, non community-wiki answers of a minimum length are eligible