Skip to content

Commit

Permalink
Fixed issue with doc viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
mazumdes committed Feb 2, 2022
1 parent d58d681 commit ee51c90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions Library.Encyclopedia.API/Controllers/FilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public async Task<IActionResult> Post(Guid id, IFormFile file, string descriptio
/// <param name="asc"></param>
/// <returns></returns>
[HttpGet("{id}")]
[Authorize(Roles = @"EncyclopediaAdministrators")]
public IActionResult Get(string id, string name, string contentType)
{
try
Expand All @@ -112,7 +111,6 @@ public IActionResult Get(string id, string name, string contentType)
/// <param name="asc"></param>
/// <returns></returns>
[HttpGet("CreateViewableLink/{id}")]
[Authorize(Roles = @"EncyclopediaAdministrators")]
public IActionResult CreateViewableLink(string id, string name)
{
try
Expand All @@ -137,7 +135,6 @@ public IActionResult CreateViewableLink(string id, string name)
/// <param name="asc"></param>
/// <returns></returns>
[HttpDelete("DestroyViewableLink/{id}")]
[Authorize(Roles = @"EncyclopediaAdministrators")]
public IActionResult DestroyViewableLink(string id, string name)
{
try
Expand Down
6 changes: 3 additions & 3 deletions Library.Encyclopedia.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"App-Base-Url": "https://tools.library.pfw.edu/encyclopedia",
"AllowedHosts": "*",
"ConnectionStrings": {
//"DefaultConnection": "Server=localhost;Database=Encyclopedia;User=root;Password=root"
"DefaultConnection": "Server=localhost;Database=Encyclopedia;User=root;Password=RW_qh+-ta5hW*2s"
"DefaultConnection": "Server=localhost;Database=Encyclopedia;User=root;Password=root"
//"DefaultConnection": "Server=localhost;Database=Encyclopedia;User=root;Password=RW_qh+-ta5hW*2s"
},
"ApiKey": "5929b003-8895-4fb3-bbb0-2eb101c48f66",
"TempAssetsBaseUrl": "https://tools.library.pfw.edu/encyclopedia/pfwencyclopediaassets",
"TempAssetsBaseUrl": "https://tools.library.pfw.edu/pfwencyclopediaassets",
"TempAssetsLocation": "C:\\inetpub\\wwwroot\\pfwencyclopediaassets",
"FileAdapterSettings": {
// linux or windows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void CreateViewableLink(string id, string name)
if (!Directory.Exists(Path.Combine(tempAssetFileLocation, id)))
Directory.CreateDirectory(Path.Combine(tempAssetFileLocation, id));

File.Copy(Path.Combine(networkPath, id, name), Path.Combine(tempAssetFileLocation, id, name));
File.Copy(Path.Combine(networkPath, id, name), Path.Combine(tempAssetFileLocation, id, name), true);
}

public void DeleteFile(string id, string name)
Expand Down

0 comments on commit ee51c90

Please sign in to comment.