mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
feat(wopi): adapt libreoffice online
This commit is contained in:
@@ -12,8 +12,9 @@ import (
|
||||
type ActonType string
|
||||
|
||||
var (
|
||||
ActionPreview = ActonType("embedview")
|
||||
ActionEdit = ActonType("edit")
|
||||
ActionPreview = ActonType("embedview")
|
||||
ActionPreviewFallback = ActonType("view")
|
||||
ActionEdit = ActonType("edit")
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -33,8 +34,9 @@ func (c *client) AvailableExts() []string {
|
||||
for ext, actions := range c.actions {
|
||||
_, previewable := actions[string(ActionPreview)]
|
||||
_, editable := actions[string(ActionEdit)]
|
||||
_, previewableFallback := actions[string(ActionPreviewFallback)]
|
||||
|
||||
if previewable || editable {
|
||||
if previewable || editable || previewableFallback {
|
||||
exts = append(exts, strings.TrimPrefix(ext, "."))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user