FileController - content disposition
This commit is contained in:
@ -95,11 +95,17 @@ namespace Oqtane.Shared
|
||||
return NavigateUrl(alias, path, parameters);
|
||||
}
|
||||
|
||||
public static string ContentUrl(Alias alias, int fileid)
|
||||
public static string ContentUrl(Alias alias, int fileId)
|
||||
{
|
||||
string url = (alias == null) ? "/~" : "/" + alias.AliasId;
|
||||
url += Constants.ContentUrl + fileid.ToString();
|
||||
return url;
|
||||
return ContentUrl(alias, fileId, false);
|
||||
}
|
||||
|
||||
public static string ContentUrl(Alias alias, int fileId, bool asAttachment)
|
||||
{
|
||||
var aliasUrl = (alias == null) ? "/~" : "/" + alias.AliasId;
|
||||
var method = asAttachment ? "/attach":"";
|
||||
|
||||
return $"{aliasUrl}{Constants.ContentUrl}{fileId}{method}";
|
||||
}
|
||||
|
||||
public static string GetTypeName(string fullyqualifiedtypename)
|
||||
@ -380,4 +386,4 @@ namespace Oqtane.Shared
|
||||
return dictionary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user