/// <summary> /// Upload logo images used during template generation in separate folder on cloud storage /// </summary> /// <param name="dataDirPath">Path to directory containing logo images</param> protected void UploadDemoFiles(string dataDirPath) { // check if folder already exists on storage ObjectExist response = this.StorageApi.ObjectExists(new ObjectExistsRequest(this.LogosFolderName)); if (response.Exists == false) { FolderApi.CreateFolder(new CreateFolderRequest(this.LogosFolderName, "storage")); } // upload logo images foreach (string logo in this.templateLogosImagesNames) { string destLogoPath = $"{this.LogosFolderName}/{logo}"; response = this.StorageApi.ObjectExists(new ObjectExistsRequest(destLogoPath)); if (response.Exists == false) { this.UploadFile(Path.Combine(dataDirPath, logo), destLogoPath); } else { Console.WriteLine($"File {destLogoPath} already exists"); } } }
public void ConvertPutFromStorage() { TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName); TestUtils.SlidesApi.SavePresentation(c_fileName, c_format, c_outPath, password: c_password, folder: c_folderName); ObjectExist exists = TestUtils.SlidesApi.ObjectExists(c_outPath); Assert.IsTrue(exists.Exists.Value); }
public void ConvertPutFromRequest() { Stream file = File.OpenRead(Path.Combine(TestUtils.TestDataPath, c_fileName)); TestUtils.SlidesApi.ConvertAndSave(file, c_format, c_outPath, c_password); ObjectExist exists = TestUtils.SlidesApi.ObjectExists(c_outPath); Assert.IsTrue(exists.Exists.Value); }
public void ConvertShapePutFromStorage() { TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName); TestUtils.SlidesApi.SaveShape( c_fileName, c_slideIndex, c_shapeIndex, c_shapeFormat, c_outPath, password: c_password, folder: c_folderName); ObjectExist exists = TestUtils.SlidesApi.ObjectExists(c_outPath); Assert.IsTrue(exists.Exists.Value); }
public void ConvertShapePutFromRequest() { Stream file = File.OpenRead(Path.Combine(TestUtils.TestDataPath, c_fileName)); TestUtils.SlidesApi.SaveShapeOnline(file, c_slideIndex, c_shapeIndex, c_shapeFormat, c_outPath, password: c_password); ObjectExist exists = TestUtils.SlidesApi.ObjectExists(c_outPath); Assert.IsTrue(exists.Exists.Value); }
public void MathSave() { const string outPath = c_folderName + "/mathml.xml"; TestUtils.Upload(c_fileName, c_folderName + "/" + c_fileName); TestUtils.SlidesApi.SavePortionAsMathMl( c_fileName, c_slideIndex, c_shapeIndex, c_paragraphIndex, c_portionIndex, outPath, c_password, c_folderName); ObjectExist exists = TestUtils.SlidesApi.ObjectExists(outPath); Assert.IsTrue(exists.Exists.Value); }