@@ -71,4 +71,5 @@ type OfficePreviewUrlReq struct {
|
||||
type VideoPreviewUrlReq struct {
|
||||
DriveId string `json:"drive_id"`
|
||||
FileId string `json:"file_id"`
|
||||
ExpireSec int `json:"expire_sec"`
|
||||
}
|
||||
|
@@ -114,10 +114,11 @@ func GetVideoPreviewUrl(fileId string, drive *conf.Drive) (*VideoPreviewUrlResp,
|
||||
req := VideoPreviewUrlReq{
|
||||
DriveId: drive.DefaultDriveId,
|
||||
FileId: fileId,
|
||||
ExpireSec: 14400,
|
||||
}
|
||||
var resp VideoPreviewUrlResp
|
||||
if err := BodyToJson(url, req, &resp, drive); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user