Hi
I want to give option to upload PPT's . Can we upload at Google Drive/Google Slides . Then provide the link to User so he/she can open PPT in another window but not download.
Thanks
Hi
I want to give option to upload PPT's . Can we upload at Google Drive/Google Slides . Then provide the link to User so he/she can open PPT in another window but not download.
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Apr 19, 2023, 4:49 AM EDT
Yes, you can upload PPTs to Google Drive and share the presentation with others through a link.
Amit MohantyRank #112 · 20K reputationPosted Apr 19, 2023, 5:01 AM EDT
Yes, it is possible to programmatically upload files to Google Drive and share them with read-only permissions using C#. You can use the Google Drive API to accomplish this.
To get started, you will need to set up a Google API Console project and enable the Google Drive API. You will also need to obtain credentials to authenticate your application with the API. Once you have the necessary credentials, you can use the Google Drive API client library for .NET to upload a file to Google Drive and set the appropriate sharing permissions.
using Google.Apis.Auth.OAuth2; using Google.Apis.Drive.v3; using Google.Apis.Drive.v3.Data; using Google.Apis.Services; using System; using System.IO; public static void UploadFile(string filePath, string folderId, string email) { // Authenticate with the Google Drive API using credentials GoogleCredential credential = GoogleCredential.FromFile("path/to/credentials.json") .CreateScoped(new[] { DriveService.Scope.Drive }); DriveService driveService = new DriveService(new BaseClientService.Initializer() { HttpClientInitializer = credential, ApplicationName = "Your Application Name", }); // Create a file metadata object var fileMetadata = new File() { Name = Path.GetFileName(filePath), Parents = new[] { folderId }, }; // Upload the file to Google Drive using (var stream = new FileStream(filePath, FileMode.Open)) { var request = driveService.Files.Create(fileMetadata, stream, "application/octet-stream"); request.Fields = "id"; var file = request.Execute(); // Share the file with read-only permissions var permission = new Permission() { Type = "user", Role = "reader", EmailAddress = email, }; var request2 = driveService.Permissions.Create(permission, file.Id); request2.Execute(); } }Raj KumarRank #25 · 44.2K reputationPosted Apr 18, 2023, 9:40 AM EDT
Can you explaing your question more in detail? where do you want to give an option?
Ramco RamcoRank #462 · 5.4K reputationPosted Apr 19, 2023, 4:55 AM EDT
Hi AMit
Can we programmatically upload on Google Drive & share with permissons read only.
Thanks