Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/bcgov/mds into mds-5772-…
Browse files Browse the repository at this point in the history
…improve-ministry-comments
  • Loading branch information
isuru-aot committed Feb 16, 2024
2 parents f2fa504 + 2748135 commit 7297a9d
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ gitops/tenant-gitops-4c2ba9
.yarn/.DS_Store
.vscode/settings.json
services/document-manager/document-manager.iml
/services/filesystem-provider/ej2-amazon-s3-aspcore-file-provider/Folder.DotSettings.user
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="19.1.0.57" />
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux" Version="19.1.0.57" />
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="24.2.6" />
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux" Version="24.2.6" />
<!-- NOTE: We may need these dependencies in the future if we implement the document/spreadsheet viewer -->
<!-- <PackageReference Include="Syncfusion.EJ2.Spreadsheet.AspNet.Core" Version="19.1.0.57" /> -->
<!-- <PackageReference Include="Syncfusion.EJ2.WordEditor.AspNet.Core" Version="19.1.0.57" /> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Syncfusion.EJ2.FileManager.AmazonS3FileProvider
{
public class AmazonS3FileProvider : AmazonS3FileProviderBase
public class AmazonS3FileProvider : IAmazonS3FileProviderBase
{
protected static string bucketName;
static IAmazonS3 client;
Expand Down Expand Up @@ -111,6 +111,12 @@ public FileManagerResponse Delete(string path, string[] names, params FileManage
return AsyncDelete(path, names, data).Result;
}

public FileManagerResponse Rename(string path, string name, string newName, bool replace = false,
bool showFileExtension = true, params FileManagerDirectoryContent[] data)
{
throw new NotImplementedException();
}

// Delete async method
public virtual async Task<FileManagerResponse> AsyncDelete(string path, string[] names, params FileManagerDirectoryContent[] data)
{
Expand Down Expand Up @@ -674,8 +680,13 @@ public virtual FileStreamResult GetImage(string path, string id, bool allowCompr
catch (Exception ex) { throw ex; }
}

// Download file(s) or folder(s)
public virtual FileStreamResult Download(string path, string[] Names, params FileManagerDirectoryContent[] data)
{
return DownloadAsync(path, Names, data).Result; // or .GetAwaiter().GetResult();
}

// Download file(s) or folder(s)
public virtual async Task<FileStreamResult> DownloadAsync(string path, string[] Names, params FileManagerDirectoryContent[] data)
{
GetBucketList();
FileStreamResult fileStreamResult = null;
Expand All @@ -690,7 +701,7 @@ public virtual FileStreamResult Download(string path, string[] Names, params Fil
{
GetBucketList();
ListingObjectsAsync("/", RootName.Replace("/", "") + path, false).Wait();
Stream stream = fileTransferUtility.OpenStream(bucketName, RootName.Replace("/", "") + path + Names[0]);
Stream stream = await fileTransferUtility.OpenStreamAsync(bucketName, RootName.Replace("/", "") + path + Names[0]);
fileStreamResult = new FileStreamResult(stream, "APPLICATION/octet-stream");
fileStreamResult.FileDownloadName = Names[0].Contains("/") ? Names[0].Split("/").Last() : Names[0];
}
Expand Down
2 changes: 1 addition & 1 deletion services/minespace-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@syncfusion/ej2-lists": "24.1.46",
"@syncfusion/ej2-navigations": "24.1.46",
"@syncfusion/ej2-notifications": "24.1.41",
"@syncfusion/ej2-pdfviewer": "24.1.46",
"@syncfusion/ej2-pdfviewer": "22.2.12",
"@syncfusion/ej2-popups": "24.1.46",
"@syncfusion/ej2-react-base": "24.1.46",
"@syncfusion/ej2-react-filemanager": "24.1.47",
Expand Down
Loading

0 comments on commit 7297a9d

Please sign in to comment.