public static void Run() { // ExStart:1 SlidesApi slidesApi = new SlidesApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); String fileName = "sample-input.pptx"; String folder = ""; String storage = "dropboxstorage "; try { // Upload source file to aspose cloud storage storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); // Invoke Aspose.Slides Cloud SDK API to get slide count using third party storage SlideListResponse apiResponse = slidesApi.GetSlidesSlidesList(fileName, folder, storage); if (apiResponse != null && apiResponse.Status.Equals("OK")) { int count = apiResponse.Slides.SlideList.Count; Console.WriteLine("Total Slides :: " + count); Console.WriteLine("Get Slide Count Using Third Party Storage, Done!"); Console.ReadKey(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); } // ExEnd:1 }
public static void Run() { // ExStart:1 SlidesApi slidesApi = new SlidesApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); String fileName = "sample-input.pptx"; int oldPosition = 3; int newPosition = 2; String folder = ""; String storage = ""; try { // Upload source file to aspose cloud storage storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); // Invoke Aspose.Slides Cloud SDK API to change position of slide in presentation SlideListResponse apiResponse = slidesApi.PostSlidesReorderPosition(fileName, oldPosition, newPosition, folder, storage); if (apiResponse != null && apiResponse.Status.Equals("OK")) { Com.Aspose.Storage.Model.ResponseMessage storageRes = storageApi.GetDownload(fileName, null, null); System.Diagnostics.Debug.WriteLine("response:" + storageRes.ResponseStream); System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, storageRes.ResponseStream); Console.WriteLine("Change Position of Slides in a PowerPoint Presentation, Done!"); Console.ReadKey(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); } // ExEnd:1 }
public static void Run() { // ExStart:1 SlidesApi slidesApi = new SlidesApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); StorageApi storageApi = new StorageApi(Common.APP_KEY, Common.APP_SID, Common.BASEPATH); String fileName = "sample-input.pptx"; String folder = ""; String storage = "dropboxstorage"; try { // Upload source file to aspose cloud storage storageApi.PutCreate(fileName, "", "", System.IO.File.ReadAllBytes(Common.GetDataDir() + fileName)); // Invoke Aspose.Slides Cloud SDK API to detect all slides using third party storage SlideListResponse apiResponse = slidesApi.DeleteSlidesCleanSlidesList(fileName, folder, storage); if (apiResponse != null && apiResponse.Status.Equals("OK")) { Com.Aspose.Storage.Model.ResponseMessage storageRes = storageApi.GetDownload(fileName, null, null); System.Diagnostics.Debug.WriteLine("response:" + storageRes.ResponseStream); System.IO.File.WriteAllBytes(Common.GetDataDir() + fileName, storageRes.ResponseStream); Console.WriteLine("Delete All Slides from a Presentation Using Third Party Storage, Done!"); Console.ReadKey(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("error:" + ex.Message + "\n" + ex.StackTrace); } // ExEnd:1 }