mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 15:06:46 +08:00
This commit is contained in:
1 parent
59ab829a48
commit
a9bd789bc4
4 files changed
+37
-12
No files matched your search
@@ -19,7 +19,6 @@ package webui
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -285,7 +284,7 @@ func renderPage(args []js.Value) (any, error) {
|
||||
}
|
||||
images := make([]any, len(page.Images))
|
||||
for i, image := range page.Images {
|
||||
images[i] = map[string]any{"name": image.Name, "url": "data:" + image.MIME + ";base64," + base64.StdEncoding.EncodeToString(image.Data)}
|
||||
images[i] = map[string]any{"name": image.Name, "mime": image.MIME, "bytes": bytesToJS(image.Data)}
|
||||
}
|
||||
return successResult(map[string]any{
|
||||
"index": page.Index,
|
||||
|
||||
Reference in new issue
Block a user