Access data/file on Sharepoint Online in c# - c#

I need to connect my web app to a sharepoint online. I read a lot of example based on on-premise SHP ed it use a Sharepoint.DLL. So MS suggest to use Graph.
My question is about best practice to implement this function:
read a list of files/folder List item
create folder
(opt) upload document

Best approach would be, develop a REST API flow using MS Flow... the MS Flow action would be when a http request comes.... then in the MS Flow handle the files reading and files uploading functionality and once you save the the flow you will get an automatic Azure REST API URL - this api you have to call from your c# code and need to pass the parameter to REST api. Note:
1.You may need to develop two MS Flow api one is for reading the items and another for uploading the document.

If you want to access SharePoint Online data using C# in your web app, you could choose SharePoint Online CSOM library:
Microsoft.SharePointOnline.CSOM
Read List Item and other objects:
How To Read Various Objects Using SharePoint Online Client Side Object Model (CSOM)
Create folder:
Create Folder in SharePoint using CSOM
Upload document:
CSOM. Upload document

Related

Copy .csv file from Azure Blob Storage to Sharepoint site

I have a CSV file stored in blob storage. The goal is to move this file into a Sharepoint site and set some metadata. What would be the best way to do this? The client does not want us to use Power Automate or Logic Apps.
I tried using Azure Data Factory but there seems to be an issue with writing data to SharePoint. I used the copy activity but the 'sink' to SharePoint failed. Does data factory support writing to Sharepoint?
The client does not want us to use Power Automate or Logic Apps.
Why not? This is the simplest way to achieve this, and is also better maintainable than for instance C# code.
Does data factory support writing to Sharepoint?
Yes, it does. However, using Data Factory only to copy a file to SharePoint is quite a bit of overkill.
If Logic Apps are not an option, have a look at an Azure Function to automatically trigger when the file is created in Azure Storage, and have a look at for instance Upload File To SharePoint Office 365 Programmatically Using C# CSOM – PNP for a C# way of uploading a file to SharePoint.

Google Cloud Storage .Net Client Library Documentation?

I'm trying to work with Google Cloud Storage, C# .Net4.5. The goal will be to manage millions of files that we will upload to Google Cloud Storage, the images will primarily be a backup copy.
I do have some code working using the .Net Client Library using the nuGet: \Google.Apis.Storage.v1.1.9.0.230\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Storage.v1.dll
What I can't find is any documentation besides what is picked up via Visual Studios' Intellisense.
I'm just looking for the full API and some examples.
Google lists:
https://developers.google.com/api-client-library/dotnet/apis/storage/v1
Browse the .Net Reference for Cloud Storage API:
https://developers.google.com/resources/api-libraries/documentation/storage/v1/csharp/latest/
But that takes one to the JSON API overview.
Can anyone kindly point to where I should be looking.
Example:
Listing objects in a bucket. I can get it to work:
listRequest = new Google.Apis.Storage.v1.ObjectsResource.ListRequest(storageService, bucketName);
The only documentation on the ListRequest class I'm able to find is what is ObjectResource.CS
Where should I be looking? Or is there just not a lot of help/doc/examples for the .Net Client Library?
Thanks again.
-andy
Click on the Classes link at the top of the page.
Here is a sample for authenticating, listing buckets and downloading objects.

Retrieving the words from WordNet database

I’m looking for a website that offers API for retrieving the words from English WordNet database.
I do not want to download the WordNet database and implement it in my server.
Simply I want to call API and get back some results in XML format from that web site.
I have a web application in ASP.net that is written in C#.
Here there is a sample from WordNet, I want to do something like that in my web application.
WordNet Online
It seems that is no such API publicly available.
According to Related Projects site part of WordNet data is avaible as API via abbreviations.com:
Abbreviations.com has created free APIs based on REST calls which return a well-formatted XML result, providing both synonyms and definitions APIs based on the WordNet database.
However on the same page in .NET/C# section you can find some publicly available local APIs, so you don't have to implement it by yourself, but have to download data files.
WordNet does not seem to expose a REST or similar API that can be used. That said, you might be able to derive the URL pattern by searching online and using that in your application and parsing the response html.
You might want to check there website to make sure this is legal.

Sharepoint 2007 Client access of files

I am trying to gain access of files within specific folders in Sharepoint 2007 from the client side. I am being told that this isn't possible, but when you have a file open from within the folder you can check in and check out the file, so obviously you are able to access the site from the client side. My question is, if I create a excel add in, am I able to open up another file within the Sharepoint site, and get the contents such as, versions and what not?
Has anyone done this before?
Thanks for any help, or links.
Yes it is possible to get files (regular HTTP GET on document's Url) and obtain most properties of the documents and list items using SharePoint web services - http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx .

which sharepoint project should be created in VS2010?

I want to get some useful data from *.csv file through the retrieve query, then put these data in the reference column of the sharepoint list using the admin account.
Which sharepoint project in VS2010 should I choose? And what should I do in next?
Thanks
如果我是要从 *.csv 文件中取一些数据 ,然后放到sharepoint上, 应该选择哪种工程呢?然后接下来应该怎么做呢?
谢谢
If you only need to run this job once you could create a console application and let it run on the server. Include a reference to the Microsoft.SharePoint.dll to be able to use the Object Model of SharePoint. See http://msdn.microsoft.com/en-us/library/ms473633.aspx for an overview of the different objects you can use. (SharePoint 2010)
If you have no access to the server you could try the same using the webservices that sharepoint exposes. See http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx for a list of the webservices in WSS3.0
But if you need it be done regularly your better of creating a webpart or a custom service to include into SharePoint. See http://msdn.microsoft.com/en-US/sharepoint/ee513148.aspx for an intro on building a WebPart for SP2010.
Google around, there is a lot to find about interaction with sharepoint through its object model.

Categories

Resources