webdav portal owa editing alpha
This commit is contained in:
parent
7aa68cd775
commit
aedc7ec08e
33 changed files with 969 additions and 153 deletions
|
@ -143,6 +143,36 @@ namespace WebsitePanel.WebDav.Core.Managers
|
|||
resource.Upload(bytes);
|
||||
}
|
||||
|
||||
public void UploadFile(string path, byte[] bytes)
|
||||
{
|
||||
var resource = new WebDavResource();
|
||||
|
||||
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
|
||||
.Append(WspContext.User.OrganizationId)
|
||||
.Append(path);
|
||||
|
||||
resource.SetHref(fileUrl);
|
||||
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
|
||||
|
||||
resource.Upload(bytes);
|
||||
}
|
||||
|
||||
public void UploadFile(string path, Stream stream)
|
||||
{
|
||||
var resource = new WebDavResource();
|
||||
|
||||
var fileUrl = new Uri(WebDavAppConfigManager.Instance.WebdavRoot)
|
||||
.Append(WspContext.User.OrganizationId)
|
||||
.Append(path);
|
||||
|
||||
resource.SetHref(fileUrl);
|
||||
resource.SetCredentials(new NetworkCredential(WspContext.User.Login, _cryptography.Decrypt(WspContext.User.EncryptedPassword)));
|
||||
|
||||
var bytes = ReadFully(stream);
|
||||
|
||||
resource.Upload(bytes);
|
||||
}
|
||||
|
||||
public void DeleteResource(string path)
|
||||
{
|
||||
path = RemoveLeadingFromPath(path, "office365");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue