fluentcms / FluentCMS

ASP.NET Core Blazor Content Management System (CMS)
https://fluentcms.com
MIT License
30 stars 11 forks source link

#1694 initial API model #1695

Closed pournasserian closed 1 month ago

TheHadiAhmadi commented 1 month ago

@pournasserian Generated Api Client file doesn't work well with Enums:

Instead of File and Folder, it generates _0 and _1

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
    public enum AssetType
    {

        _0 = 0,

        _1 = 1,

    }
TheHadiAhmadi commented 1 month ago

FileClient.UploadAsync method should support nullable FolderId parameter.

TheHadiAhmadi commented 1 month ago

Please add an API for getting available folders for updating FolderId field of an asset.

I'll show FormSelect in UI.

List of folders should be like this:

id: Guid, text: "One"
id: Guid, text: "One / SubFolder 1"
id: Guid, text: "One / SubFolder 2"
id: Guid, text: "One / SubFolder 2 / SubSub 1"
id: Guid, text: "One / SubFolder 2 / SubSub 2"
id: Guid, text: "One / SubFolder 3"

It should not return current folder and all it's children in the list. (to prevent recursion)

pournasserian commented 1 month ago

@pournasserian Generated Api Client file doesn't work well with Enums:

Instead of File and Folder, it generates _0 and _1

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
    public enum AssetType
    {

        _0 = 0,

        _1 = 1,

    }

resolved

pournasserian commented 1 month ago

FileClient.UploadAsync method should support nullable FolderId parameter.

Resolved

TheHadiAhmadi commented 1 month ago

Should Delete Folder also delete all it's Children? (API related)

TheHadiAhmadi commented 1 month ago

we should Add Update File Api.

Update Folder Api always fails (Folder.NotFound)

Download File api should be available for all users (or support query parameter as token) to allow file preview for admin.

in Upload File page, submit button doesn't work (this issue is Frontend related, but I couldn't fix)

Delete File should also the file from file system