allow specifying conversion resolution, drop explicit dpi
This commit is contained in:
@@ -46,9 +46,11 @@ func (c *Client) SetPollInterval(interval time.Duration) {
|
||||
func (c *Client) CreateConversion(
|
||||
ctx context.Context,
|
||||
sourceFilename string,
|
||||
resolution officeconvertapiv1.ConversionResolution,
|
||||
) (*officeconvertapiv1.CreateConversionResponse, error) {
|
||||
req := connect.NewRequest(&officeconvertapiv1.CreateConversionRequest{
|
||||
SourceFilename: sourceFilename,
|
||||
Resolution: resolution,
|
||||
})
|
||||
res, err := c.rpc.CreateConversion(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
@@ -16,7 +16,11 @@ type ConversionResult struct {
|
||||
|
||||
// ConvertPPTXFile runs the full create-upload-start-wait-fetch flow.
|
||||
func (c *Client) ConvertPPTXFile(ctx context.Context, localPPTXPath string) (*ConversionResult, error) {
|
||||
createRes, err := c.CreateConversion(ctx, filepath.Base(localPPTXPath))
|
||||
createRes, err := c.CreateConversion(
|
||||
ctx,
|
||||
filepath.Base(localPPTXPath),
|
||||
officeconvertapiv1.ConversionResolution_CONVERSION_RESOLUTION_UNSPECIFIED,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("create conversion: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user