🎨 Asset link element prompt shows more information https://github.com/siyuan-note/siyuan/issues/10714

This commit is contained in:
Daniel 2024-03-25 09:27:51 +08:00
parent 9e2a77bff7
commit 433c0b6dde
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -25,6 +25,7 @@ import (
"github.com/88250/gulu"
"github.com/djherbis/times"
"github.com/dustin/go-humanize"
"github.com/gin-gonic/gin"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/siyuan/kernel/model"
@ -66,9 +67,12 @@ func statAsset(c *gin.Context) {
}
ret.Data = map[string]interface{}{
"size": info.Size(),
"created": t.BirthTime().UnixMilli(),
"updated": t.ModTime().UnixMilli(),
"size": info.Size(),
"hSize": humanize.Bytes(uint64(info.Size())),
"created": t.BirthTime().UnixMilli(),
"hCreated": t.BirthTime().Format("2006-01-02 15:04:05"),
"updated": t.ModTime().UnixMilli(),
"hUpdated": t.ModTime().Format("2006-01-02 15:04:05"),
}
}