I'm making a simple program with C#.Net that provides some clients with links which are continuously updated ,and I need to provide a simple text database for my app.
I need to use Google drive to make it easy to edit the database by some users.
So ,how can I download a text or doc file uploaded to Google drive and shared publicly ?
Use the following Google Drive SDK
https://developers.google.com/drive/examples/dotnet
Related
What's the simplest way for an Azure Functions to save a file into OneDrive? How does authentication work from a deployed Azure Function?
To make this discussion simpler, we have a string var content = "This is the file content" which needs to be saved as sample.txt file.
What if OneDrive folder is shared with an URL (real shared OneDrive link, will be removed - https://1drv.ms/f/s!Ak7ywxppmRtB8uRKhvT1FLmNBwXNwQ) and no authentication is required?
I'd recommend taking a look at the Microsoft Graph APIs for managing files stored in OneDrive.
They have great C# examples using the Microsoft.Graph NuGet package. You will need to implement a mechanism of authentication however and I don't think there is a way around this. For the Graph, I'd recommend looking at these implementations for getting authenticated for a user.
Once you've authenticated in your Function app, you should be able to get to where you need to be using the Graph APIs for OneDrive available.
List a user's drives
Upload or update a file in a drive
I want to use Google Drive as a SQL server. Can Google Drive API update data in SQLite files without having to downloading and uploading them?
What about XML files? Can Google Drive API update data in XML files without having to downloading and uploading them?
Google drive is a file storage system. You can upload, download, list and update the meta data of files. It does not have any access to edit the contents files themselves. So you would need to upload and download the file.
The Google Docs api has the ability to edit google doc files but I would question what would happen to the formatting of the xml in a google doc file.
The google sheets api lets you edit google sheets documents I have seen people use that as a csv file to store data.
TBH you are using the wrong tool for the job. There are a number of cloud based database solutions. If you want to stick with google tech check out firebase. MySql is also free as well as postgresql I have used both with C#
I am trying to open and edit a Microsoft word document in google docs from my .NET MVC project.
Currently, whenever I open the document it is uploaded to the google drive of the user and then opens for editing.
I am using the Google Drive API v3.
I want to open and edit the document without being uploaded in the drive i.e. There should be no trace of the file in the drive. The file is opened and edited directly without being created or uploaded in the Google drive.
The google drive api is a file storage API. You can upload, download files and create files. It does not have the ability to directly edit the constants of any files directly this is out of scope for this API.
The Google docs api would allow you to edit google doc type files but not a MS word file. You would need to upload the file to Google drive convert it to a google docs file then use the google docs api on it for editing programmatic.
If you want to open a MS word document why not look for a library that handles opening ms word documents.
I developed web-application to upload file to google drive and download from it with google drive.
but if i am using webcontent link for donwload file from Google drive then anyone can share this link to other. so can anyone have solution for temporary or one-time download link for file download?
or If the file downloaded by that link, then the link will be destroyed or not used anyway until a new link exist.
So is this possible with google drive api?
Currently there is no one time download link in Google drive. If you create a shareable link as you stated it will work forever. It cant be removed or disabled and it can be shared between users.
You might consider adding this as a feature request on the Issue forum
Anwser: No this is not possible with the Google drive api. Although i wonder if it isnt something you could do with in your web app and do a redirect type of thing. Its just an idea.
I've been looking for some information about the subject, the thing is I'm trying to open, read, write files in dropbox thru a WPF app. So far I found this video https://www.youtube.com/watch?v=fcT-Jt8rcdY and the problem is that it uses windows forms and also has to introduce username and password to login. I just want to use dropbox as a tool to save some files in the cloud without loging everytime the program want to acces to dropbox. Any ideas?
You can use DropBox Linker, a library for using DropBox in .NET WPF application.
http://dropboxlinker.codeplex.com