webdav portal owa support check added
This commit is contained in:
parent
5795ffb0bc
commit
010c258502
16 changed files with 246 additions and 20 deletions
|
@ -116,6 +116,26 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
|||
return PartialView("_ResourseCollectionPartial", result);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public ActionResult DownloadFile(string org, string pathPart)
|
||||
{
|
||||
if (org != WspContext.User.OrganizationId)
|
||||
{
|
||||
return new HttpStatusCodeResult(HttpStatusCode.NoContent);
|
||||
}
|
||||
|
||||
string fileName = pathPart.Split('/').Last();
|
||||
|
||||
if (_webdavManager.IsFile(pathPart) == false)
|
||||
{
|
||||
throw new Exception(Resources.NotAFile);
|
||||
}
|
||||
|
||||
var fileBytes = _webdavManager.GetFileBytes(pathPart);
|
||||
|
||||
return File(fileBytes, MediaTypeNames.Application.Octet, fileName);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult UploadFile(string org, string pathPart)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue