@@ -71,4 +71,5 @@ type OfficePreviewUrlReq struct {
|
|||||||
type VideoPreviewUrlReq struct {
|
type VideoPreviewUrlReq struct {
|
||||||
DriveId string `json:"drive_id"`
|
DriveId string `json:"drive_id"`
|
||||||
FileId string `json:"file_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{
|
req := VideoPreviewUrlReq{
|
||||||
DriveId: drive.DefaultDriveId,
|
DriveId: drive.DefaultDriveId,
|
||||||
FileId: fileId,
|
FileId: fileId,
|
||||||
|
ExpireSec: 14400,
|
||||||
}
|
}
|
||||||
var resp VideoPreviewUrlResp
|
var resp VideoPreviewUrlResp
|
||||||
if err := BodyToJson(url, req, &resp, drive); err != nil {
|
if err := BodyToJson(url, req, &resp, drive); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &resp, nil
|
return &resp, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user