Hot answers tagged

9

You need to move the list Url to your module definition: <Module Name="Style Library" Url="Style Library" RootWebOnly="true"> for GhostableInLibrary to work properly. You should of course then remove it from the File Url, since it is now defined on module level. If you have no Url in the Module tag you can only use type="Ghostable" on your File ...


8

In order to manage unique permissions for a Securable Object like List or File (via associated List Item) or Folder (via associated List Item) there is a common approach that you could consider: Break role inheritance for a securable object Add/remove the role assignment on the securable object [optional] How to: set unique permissions for a File via ...


6

The rules are "very simple" (see the full KB article here), which is why you should alway use SPUrlUtility to check filenames. Except about folders and files: Folder names •You cannot use the following characters anywhere in a folder name or a server name: ◦tilde ◦number sign ◦percent ◦ampersand ◦asterisk ◦braces ◦backslash ◦colon ...


5

If you are asking whether you can leave files in a file share and access them through SharePoint with the out-of-the-box features then the answer is no. There are however, 3rd party solutions out there that you can look at such as the "File Share Library" by Bamboo Solutions or I believe AvePoint also has a solution. On the other hand, if you are asking ...


4

If I only want to download the stream of the file then the ClientContext object isn't that picky about the website url. The file can be easily downloaded and written to a file. Uri filename = new Uri(@"http://server/sites/site1/subsite/doclib/folder1/folder2/prettyimage.jpg"); string server = filename.AbsoluteUri.Replace(filename.AbsolutePath, ""); string ...


4

It is still not supported to upload multiple files with managed metadata or simple metadata.


3

To deploy your file so that SharePoint can access it, you have several options but in your case as it is needed only by your feature event receiver you can deploy it under the feature's root folder. To do so, simply put your file inside a module with a deployment type of "ElementFile". Something like: <?xml version="1.0" encoding="utf-8"?> ...


3

The user account that operates the search crawling has to be given read permission to the file share you wish to crawl.


3

The New Document button should open the template specified on the document library for the user. Then they can save the document back into the library. Upload Document is just that, uploads a doc. If you're seeing Upload for the New, I think this is because you either don't have a template specified for your content type, or you're on a browser that doesn't ...


3

No, no OOB settings can prevent a user from overwriting an existing document, unless you do one of the things suggested in the other answers OR you create an event receiver and attach it to your library. In this event receiver, for the itemAdding event handler, you then check if there's another document with the same name and in this case, you cancel the ...


3

Try deleting the items in PowerShell after setting SPWeb.AllowUnsafeUpdates = true; If that doesn't work you may need to create a new list and move the good list items there and then delete your old list using this method. After that you should be able to recreate the list with the same URL as before and move all of the items back.


3

Sounds like the "Open in Explorer" feature is your best bet. Go to the target library, click the "Library" tab, and click "Open in Explorer" (only works in 32 bit IE). This will make the library look like a regular windows folder, from there you can copy and paste files in.


3

Make JSlink load your file You can put multiple files in the JSlink where you now use: ~sitecollection\....\yourCSRfile.js They have to be separated by a ; (semi-colon) They do not have to be CSR files, can be any JS file (It is called JSlink for a reason). But they have to be in a location where JSlink may access them: ~site or ~sitecollection (and ...


2

There is no easy way unless you find some utility function where you pass an object which will use Reflection to extract all properties Good old way is to Get-SPSite 'http://sitecollectionurl' That can give you an SPSite Object. Now you can choose the properties of your interest and put it into a text file using Out-File 'FileName.Txt' - Append Final ...


2

Apparently there's a property called FileLeafRef, and I could query the library like so... $.ajax({ url: "site.url/_api/web/lists/getByTitle('LibraryName')/items?$top=1000&$select=FileLeafRef", type: "GET", headers: { "accept": "application/json;odata=verbose" ...


2

try this: $.ajax({ url: "site/_api/web/GetFolderByServerRelativeUrl('Documents')/Files", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function(data){ //console.log(data); for(var i = 0; i<data.d.results.length; i++){ var result data.d.result[i]; ...


2

On upload there is a checkbox "Overwrite current version" (or similar). This is the only setting there is. The main problem is that this option is not given if the user drag-and-drops documents to a library view!


2

If users have "Contribute" permission only and if document library sets to display only users own documents, they can not overwrite documents of eachother. If they try to save a document with same name, it will give a "Permission Denied" error.


2

That is certainly one option. Another option is to do individual site collection backups as well as full content db backups. This way, you can restore a single site collection to a separate farm, grab the file, then delete the site collection.


2

expanding on Annchal method you could use explorer view to do this. Time is money, your going to manually create the document library and then write and test the code which could take some time to get it correct as its over three libs on sharepoint. opening the document library in explorer view will make it easy for you to move the whole folder or copy ...


2

Their are couple of ways to download the documents from SharePoint Document library. Using the Explorer view, you can drag and drop the documents to local directory. UNC mapping to the SharePoint document library and drag/drop documents to a file share. You could refer this blog for details. This is simplest way but it will not display files that exceed ...


2

You can't use only JavaScript to do this. The CopyIntoItems method takes a byte[] stream parameter. This means you need to be able to read a file into a byte array and then pass this to the method. This first step isn't possible in JavaScript.


2

Your IIS SSL configuration is not right, you are mixing client certificates with SSL server certificates. You want to use SSL Server certificates for the site, not client certificates. Disable client certificates, and configure correct SSL certificate in IIS web site bindings. Review the article for details here.


2

You need to $select and $expand the AttachmentFiles property for your list items if you want to select many items from the list. _api/lists/getByTitle('MyList')/items?$select=AttachmentFiles,Title&$expand=AttachmentFiles Then you can get attachment info (if it exists) in the AttachmentFiles property of your list item which will be an array of ...


2

Based on my research and past experience this could be an approach to download files from a SharePoint Document Library. First you get connected to the SharePoint site, and retrieve using list.GetItemById(ID) function. Once you load item object, you can get the Server Relative Url of the file. And from this Url you can download the document. You can read ...


2

When you edit a file in SPD, the file automatically becomes "Unghosted". This (rather confusing) term means that the file has been "Customized". The effects of this depends on what type of file you are editing. For example, if you are editing a Page Layout, the code that's added will literally break the page, since the content added will not be wrapped ...


2

as per my knowledge you have to upload a template document with content type and metadata mapping. so u can update the document. because document is generated based on your template. below couple of links which helps you.. http://somnathmatere.blogspot.in/2011/05/how-to-programmatically-upload-document.html ...


2

The easiest way would be to use Web.GetFileByServerRelativeUrl See msdn


2

This is totally normal when working with Client Object Model (CSOM). All operations are batched and not performed until you fire them away using ExecuteQuery() or ExecuteQueryAsync(). The rest of your code is just setting of local properties, which is converted into an XML format, which is sent to SharePoint at the time you execute the ExecuteQuery method.


2

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 ...



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