Torch Object Storage
Parameter | Description | Value | Required |
Parameter | Description | Value | Required |
x-tos-doc-src-type | Specifies the type of file you want to preview. tip Currently, TOS uses the file name extension of an object to determine its source data type during file conversion. This parameter must be specified if an object lacks a file name extension. | pptx, ppt, doc, docx, xls, xlsx, and pdf. | No |
x-tos-doc-dst-type | Specifies the output format. tip When you preview a spreadsheet file as images, one sheet can be split into several images during conversion. | png, jpg, pdf, and html. The default value is jpg. | No |
x-tos-doc-page | Specifies the page number to be converted when the output format is an image. tip The page parameter does not apply when the output format is pdf or html because page selection is unavailable for those formats. | [1,5000] The default value is 1. | No |
x-tos-doc-image-dpi | Renders the image at the specified DPI. This parameter only applies when the output format is png or jpg. Setting a low value decreases processing time, whereas setting a high value increases it. | [96-600] The default value is 300. | No |
x-tos-doc-image-quality | Specifies the quality of the transcoded image. For example, a value of 90 indicates 90% image quality. | [1,100] The default value is 90. | No |
Field | Description | Value |
Field | Description | Value |
content-type | Returns a value based on the actual format of the image. | image/jpeg, image/png, application/pdf, and text/html. |
x-tos-total-page | Returns the total number of pages in the document. For spreadsheet files, the value of this field indicates the total number of images converted from the current sheet. | - |