add API method to get File based on name, and fix permission validation for Folder

This commit is contained in:
sbwalker
2023-07-10 08:44:14 -04:00
parent 9a3b458c45
commit c597c4c234
4 changed files with 34 additions and 3 deletions

View File

@ -1,5 +1,6 @@
using Oqtane.Models;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Oqtane.Services
@ -33,6 +34,15 @@ namespace Oqtane.Services
/// <returns></returns>
Task<File> GetFileAsync(int fileId);
/// <summary>
/// Get a <see cref="File"/> based on the <see cref="Folder"/> and file name.
/// </summary>
/// <param name="folderId">Reference to the <see cref="Folder"/></param>
/// <param name="name">name of the file
/// </param>
/// <returns></returns>
Task<File> GetFileAsync(int folderId, string name);
/// <summary>
/// Add / store a <see cref="File"/> record.
/// This does not contain the file contents.