Skip to content

Commit

Permalink
Merge pull request SyncfusionExamples#5 from Bhuvaneswarin/master
Browse files Browse the repository at this point in the history
config(EJ2-35120): Update the azure service provider
  • Loading branch information
gsumankumar authored Jan 3, 2020
2 parents ce18a84 + a9734da commit 2b8fa90
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 17.3.26 (2019-11-05)

### Azure Cloud File System Provider

#### Breaking Changes

- Now, the `setBlobContainer` method is renamed as `SetBlobContainer`.

## 17.3.14 (2019-10-04)

### Azure Cloud File System Provider
Expand Down
16 changes: 16 additions & 0 deletions Controllers/AzureProviderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public AzureProviderController(IHostingEnvironment hostingEnvironment)
this.operation = new AzureFileProvider();
this.operation.RegisterAzure("<--accountName-->", "<--accountKey-->", "<--blobName-->");
this.operation.SetBlobContainer("<--blobPath-->", "<--filePath-->");
//----------
//for example
//this.operation.RegisterAzure("azure_service_account", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "files");
//this.operation.setBlobContainer("https://azure_service_account.blob.core.windows.net/files/", "https://azure_service_account.blob.core.windows.net/files/Files");
//---------
}
[Route("AzureFileOperations")]
public object AzureFileOperations([FromBody] FileManagerDirectoryContent args)
Expand All @@ -30,6 +35,11 @@ public object AzureFileOperations([FromBody] FileManagerDirectoryContent args)
{
string startPath = "<--blobPath-->";
string originalPath = ("<--filePath-->").Replace(startPath, "");
//-----------------
// for example
//string startPath = "https://azure_service_account.blob.core.windows.net/files/";
//string originalPath = ("https://azure_service_account.blob.core.windows.net/files/Files").Replace(startPath, "");
//-------------------
args.Path = (originalPath + args.Path).Replace("//", "/");
args.TargetPath = (originalPath + args.TargetPath).Replace("//", "/");
}
Expand Down Expand Up @@ -83,6 +93,12 @@ public ActionResult AzureUpload(FileManagerDirectoryContent args)
string startPath = "<--blobPath-->";
string originalPath = ("<--filePath-->").Replace(startPath, "");
args.Path = (originalPath + args.Path).Replace("//", "/");
//----------------------
//for example
//string startPath = "https://azure_service_account.blob.core.windows.net/files/";
//string originalPath = ("https://azure_service_account.blob.core.windows.net/files/Files").Replace(startPath, "");
//args.Path = (originalPath + args.Path).Replace("//", "/");
//----------------------
}
operation.Upload(args.Path, args.UploadFiles, args.Action, args.Data);
return Json("");
Expand Down
5 changes: 0 additions & 5 deletions Models/AzureFileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -948,10 +948,5 @@ protected virtual string WildcardToRegex(string pattern)
{
return "^" + Regex.Escape(pattern).Replace(@"\*", ".*").Replace(@"\?", ".") + "$";
}

public void setDownloadPath(string downloadLocation)
{
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<RootNamespace>Syncfusion.EJ2.FileManager.AzureFileProvider</RootNamespace>
<AssemblyName>Syncfusion.EJ2.FileManager.AzureFileProvider</AssemblyName>
<AssemblyVersion>17.2.0.34</AssemblyVersion>
<FileVersion>17.2.0.34</FileVersion>
<Version>17.2.0.34</Version>
<AssemblyVersion>17.4.0.40</AssemblyVersion>
<FileVersion>17.4.0.40</FileVersion>
<Version>17.4.0.40</Version>
<Product>Syncfusion file manager Azure file provider for Essential JS 2</Product>
<Company>Syncfusion Inc.</Company>
<PackageId>Syncfusion.EJ2.FileManager.AzureFileProvider</PackageId>
Expand All @@ -26,7 +26,7 @@
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="17.3.0.26" />
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="17.4.0.40"/>
</ItemGroup>

</Project>
4 changes: 1 addition & 3 deletions web.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" arguments="%LAUNCHER_ARGS%">
<environmentVariables />
</aspNetCore>
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" arguments="%LAUNCHER_ARGS%" />
</system.webServer>
</configuration>
<!--ProjectGuid: D2F1360E-DF8C-4AD2-A8CC-942A180D6762-->

0 comments on commit 2b8fa90

Please sign in to comment.