package document_request import ( "git.sxidc.com/student-physical-examination/contract_lock_sdk/http" "os" ) type DocumentCreatesponsorfileRequest struct { // core:true 【附件文档】附件文档 【作用】 用于上传本地文件,文件上传后系统将自动将文档转换为PDF格式,方便后续进行查看 【传参】 1、支持的文件格式:pdf,doc,docx,wps,rtf,png,gif,jpg,jpeg,tiff,html,htm,xls,xlsx,txt,ofd,dwg,ppt,pptx。 2、若上传CAD图纸(dwg格式),请先开启电子签章管理后台-自定义配置DWG_SWITCH。 3、当上传的文档为PDF时,PDF的版本需要>1.3;上传签署文档大小限制可在电子签章管理后台-电子用印设置-文件上传限制进行配置。 File *os.File `json:"file"` // core:true 【附件文档名称】附件文档名称 【作用】 用于传入上传的附件文档的名称 Title string `json:"title"` // core:true 【预览页展示下载按钮】预览页展示下载按钮 【传参】 取值范围:true(展示),false(不展示);不传值默认为:false(不展示)。 ViewDownload string `json:"viewDownload,omitempty"` // 【链接有效期】链接有效期 【作用】 1、用于设置获取到的链接在多长时间后过期 2、参数不传值时,链接有效期取电子签章管理后台设置的“接口页面默认有效期 3、参数传入时长超过电子签章管理后台设置的“接口页面最大有效期天数”时,将以后台设置的有效期为准 【传参】 最小值:1。单位:秒。 ExpireTime *int64 `json:"expireTime,omitempty"` } func (obj DocumentCreatesponsorfileRequest) GetUrl() string { return "/document/createsponsorfile" } func (obj DocumentCreatesponsorfileRequest) GetHttpParameter() *http.HttpParameter { parameter := http.NewPostHttpParameter() parameter.AddParam("title", obj.Title) parameter.AddParam("viewDownload", obj.ViewDownload) parameter.AddParam("expireTime", obj.ExpireTime) parameter.AddFiles("file", obj.File) return parameter }