|
|
@@ -421,6 +421,7 @@ func (this *ActivitiService) ExcelToPdf(addressUrl string) string {
|
|
|
if _filer := os.Getenv("GOSWFS_FILER_URL"); _filer != "" {
|
|
|
filer = []string{_filer}
|
|
|
}
|
|
|
+ fmt.Println("GOSWFS_FILER_URL6 == ", os.Getenv("GOSWFS_FILER_URL"))
|
|
|
sw = NewSeaweed("http", utils.Cfg.MustValue("file", "upFileHost"), filer, 2*1024*1024, 5*time.Minute)
|
|
|
//_, fID, err := sw.Upload(retVal.Body, "tmp.pdf", int64(len(pdfByte)), "", "")
|
|
|
_, _, fID, err := sw.UploadFile(_dir, "", "")
|
|
|
@@ -468,6 +469,7 @@ func (this *ActivitiService) WordToPdf(addressUrl string) string {
|
|
|
if _filer := os.Getenv("GOSWFS_FILER_URL"); _filer != "" {
|
|
|
filer = []string{_filer}
|
|
|
}
|
|
|
+ fmt.Println("GOSWFS_FILER_URL5 == ", os.Getenv("GOSWFS_FILER_URL"))
|
|
|
sw = NewSeaweed("http", utils.Cfg.MustValue("file", "upFileHost"), filer, 2*1024*1024, 5*time.Minute)
|
|
|
//_, fID, err := sw.Upload(retVal.Body, "tmp.pdf", int64(len(pdfByte)), "", "")
|
|
|
_, _, fID, err := sw.UploadFile(_dir, "", "")
|
|
|
@@ -516,9 +518,12 @@ func (this *ActivitiService) WordToPdfWithWatermark(wartermark, addressUrl strin
|
|
|
if _filer := os.Getenv("GOSWFS_FILER_URL"); _filer != "" {
|
|
|
filer = []string{_filer}
|
|
|
}
|
|
|
+ fmt.Println("GOSWFS_FILER_URL4 == ", os.Getenv("GOSWFS_FILER_URL"))
|
|
|
sw = NewSeaweed("http", utils.Cfg.MustValue("file", "upFileHost"), filer, 2*1024*1024, 5*time.Minute)
|
|
|
//_, fID, err := sw.Upload(retVal.Body, "tmp.pdf", int64(len(pdfByte)), "", "")
|
|
|
_, _, fID, err := sw.UploadFile(_dir, "", "")
|
|
|
+ fmt.Println("err_表单下载4=", err)
|
|
|
+ fmt.Println("fID_表单下载4=", fID)
|
|
|
retDocUrl := utils.Cfg.MustValue("file", "downFileHost") + "/" + fID
|
|
|
os.Remove(_dir)
|
|
|
fmt.Println("==retDocUrl==", retDocUrl)
|
|
|
@@ -565,9 +570,12 @@ func (this *ActivitiService) FillWordTemplate(datas map[string]interface{}, temp
|
|
|
if _filer := os.Getenv("GOSWFS_FILER_URL"); _filer != "" {
|
|
|
filer = []string{_filer}
|
|
|
}
|
|
|
+ fmt.Println("GOSWFS_FILER_URL3 == ", os.Getenv("GOSWFS_FILER_URL"))
|
|
|
sw = NewSeaweed("http", utils.Cfg.MustValue("file", "upFileHost"), filer, 2*1024*1024, 5*time.Minute)
|
|
|
//_, fID, err := sw.Upload(retVal.Body, "tmp.pdf", int64(len(pdfByte)), "", "")
|
|
|
_, _, fID, err := sw.UploadFile(_dir, "", "")
|
|
|
+ fmt.Println("err_表单下载3=", err)
|
|
|
+ fmt.Println("fID_表单下载3=", fID)
|
|
|
retDocUrl := utils.Cfg.MustValue("file", "downFileHost") + "/" + fID
|
|
|
os.Remove(_dir)
|
|
|
fmt.Println("==retDocUrl==", retDocUrl)
|
|
|
@@ -611,9 +619,12 @@ func (this *ActivitiService) FillExcel(datas map[string]interface{}, ContractCla
|
|
|
if _filer := os.Getenv("GOSWFS_FILER_URL"); _filer != "" {
|
|
|
filer = []string{_filer}
|
|
|
}
|
|
|
+ fmt.Println("GOSWFS_FILER_URL2 == ", os.Getenv("GOSWFS_FILER_URL"))
|
|
|
sw = NewSeaweed("http", utils.Cfg.MustValue("file", "upFileHost"), filer, 2*1024*1024, 5*time.Minute)
|
|
|
//_, fID, err := sw.Upload(retVal.Body, "tmp.pdf", int64(len(pdfByte)), "", "")
|
|
|
_, _, fID, err := sw.UploadFile(_dir, "", "")
|
|
|
+ fmt.Println("err_表单下载2=", err)
|
|
|
+ fmt.Println("fID_表单下载2=", fID)
|
|
|
retDocUrl := utils.Cfg.MustValue("file", "downFileHost") + "/" + fID
|
|
|
os.Remove(_dir)
|
|
|
fmt.Println("==retDocUrl==", retDocUrl)
|
|
|
@@ -664,6 +675,9 @@ func (this *ActivitiService) FillWordWatermarkTemplate(datas map[string]interfac
|
|
|
if _filer := os.Getenv("GOSWFS_FILER_URL"); _filer != "" {
|
|
|
filer = []string{_filer}
|
|
|
}
|
|
|
+
|
|
|
+ fmt.Println("GOSWFS_FILER_URL1 == ", os.Getenv("GOSWFS_FILER_URL"))
|
|
|
+
|
|
|
sw = NewSeaweed("http", utils.Cfg.MustValue("file", "upFileHost"), filer, 2*1024*1024, 5*time.Minute)
|
|
|
//_, fID, err := sw.Upload(retVal.Body, "tmp.pdf", int64(len(pdfByte)), "", "")
|
|
|
_, _, fID, err := sw.UploadFile(_dir, "", "")
|