fix: 🐛 disable config loading to allow pdfcpu usage in web
This commit is contained in:
parent
93ef9edd15
commit
f674524aea
5
main.go
5
main.go
@ -13,6 +13,7 @@ import (
|
||||
"syscall/js"
|
||||
|
||||
pdfcpu "github.com/pdfcpu/pdfcpu/pkg/api"
|
||||
"github.com/pdfcpu/pdfcpu/pkg/pdfcpu/model"
|
||||
)
|
||||
|
||||
type Customer struct {
|
||||
@ -129,6 +130,10 @@ func createArchive(this js.Value, args []js.Value) any {
|
||||
return promiseConstructor.New(handler)
|
||||
}
|
||||
|
||||
func init() {
|
||||
model.ConfigPath = "disable"
|
||||
}
|
||||
|
||||
func main() {
|
||||
c := make(chan struct{}, 0)
|
||||
js.Global().Set("createArchive", js.FuncOf(createArchive))
|
||||
|
Loading…
Reference in New Issue
Block a user