document-library

Drag and Drop files into a SharePoint webpart to upload into DocLibrary

旧街凉风 提交于 2020-01-04 05:44:29
问题 Is it possible to create a SharePoint (wss3 or MOSS 2007) webpart, to allow files to be dragged and dropped onto it, which would then upload the files into a predefined document library ? I imagine that this would require some form of client side scripting (Ajax ?), but my knowledge in ajax is a bit sketchy. From my exploration so far, I'm thinking: User drags file onto 'drop zone' Webpart. This action triggers some code This code Loads the file into a SharePoint library (like this :

Office365-REST-Python-Client Access Token issue

爷,独闯天下 提交于 2019-12-23 05:19:56
问题 I've found many examples of using the Office365-REST-Python-Client however, none of them are correctly obtaining the access token. I've registered an app under the Azure Portal, granted it API permissions using 'Application permissions', created a secret and used the client_secret and client_id in my settings dictionary to use in the below code. def read_folder_and_files(context, list_title): """Read a folder example""" list_obj = context.web.lists.get_by_title(list_title) folder = list_obj

How to use CopyIntoItems to copy files into existing doclib items

我怕爱的太早我们不能终老 提交于 2019-12-12 05:48:54
问题 This is my scenario: I need to copy files to a sharepoint document library using its web services and set metadata on them. That's all possible with CopyIntoItems (from Copy webservice) except for Lookup fields. CopyIntoItems ignores them, so i need another way to set data on those fields. I've tried to create a list item with the mandatory and lookup fields metadata and then, using the item ID (creating a FieldInformation field with the ID, as well as some other simple metadata), called the

Get images from Liferay Document Library whose id is stored in separate databse table

时光怂恿深爱的人放手 提交于 2019-12-11 10:52:42
问题 I have an Employee table which stores details of Employees (name,date of birth etc) I have a field in Employee table named fileEntryId which stores the Id of the employee pics which are stored in DL in liferay. What I want to do is if the fileEntryId in Employee matches with fileEntryId of the dlfileEntry table of the Document Library then display the images in the search container along with details from Employee table. How to this? EDITED: I have a little problem here. All the images are

Is it easy to convert (about 15 lines of code) c# code to Powershell

房东的猫 提交于 2019-12-11 08:35:02
问题 I found this code online and wondering if it's easy to convert to Powershell. I am getting this error Missing expression after ','. At C:\AddaItem.ps1:60 char:73 + $newFile = $docLibrary.RootFolder.Files.Add($newDestinationFolderPath, <<<< UTF8Encoding.UTF8.GetBytes(builder.ToString()), $true) + CategoryInfo : ParserError: (,:String) [], ParseException + FullyQualifiedErrorId : MissingExpressionAfterToken It appears to be complaining about this line: $newFile = $docLibrary.RootFolder.Files

How to obtain document library name from the URL

你。 提交于 2019-12-11 06:07:09
问题 How to obtain document library name from the URL cqwp. For example, http:///sites/site1/DocLib/Forms/AllItems.aspx I know there is substring function with xsl <xsl:param name="DocLibName"> select=substring(url) or whatever the code should be </xsl:param> 回答1: The following code will give you the name of your document library from the URL you posted (or from any view in your document library) String pattern = ".*/(?<listStaticName>.+)/[^\\.]+\\.aspx"; Regex regex = new Regex(pattern);

Negative ItemCount in SharePoint Document Library

巧了我就是萌 提交于 2019-12-11 04:26:02
问题 What can be done about negative numbers in library item counts? ItemCount is a read-only property, what are you supposed to do when it is drastically incorrect? Earlier last week, I was doing some testing involving the copying and moving of files and folders from one document library to another. I was transfering the items from our actual document library to a sandbox "Test" library that I used to run all sorts of object model and workflow testing in before migrating to the public lists and

Store documents in file system instead of database in SharePoint document library

和自甴很熟 提交于 2019-12-10 04:13:43
问题 In a SharePoint document library, is there any way to store the documents on the file system instead of the database? 回答1: You can make SharePoint store its documents outside the DB using the SharePoint External Storage API. In other words, this isn't some functionality accessible through the SharePoint interface, but the system does offer a way of building it yourself. There are third party providers like StoragePoint that will do the job for you. 回答2: Documents in a SharePoint document

Upload document to specific folder in a SharePoint Document library using WebClient

穿精又带淫゛_ 提交于 2019-12-08 06:17:18
问题 I have some client side code that uploads an Outlook email to a document library and as long as the path is pointing to the root of the doc library it works just fine. @"https://<server>/sites/<subweb>/<customer>/<teamweb>/<Documents>/" + docname; is the projectUrl in this function : public bool SaveMail(string filepath, string projectUrl) { try { using (WebClient webclient = new WebClient()) { webclient.UseDefaultCredentials = true; webclient.UploadFile(projectUrl, "PUT", filepath); } }

Dynamically display Edit Control Block menu item in SharePoint

大城市里の小女人 提交于 2019-12-07 04:07:05
问题 I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership. I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I have with this is that the groups I am using have identical rights in the site (ViewListItems, ManageAlerts, etc). The groups that we have set up deal more with function, such as Manager,