You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Document preview
Overview
Copy page
Download PDF
Overview
TOS allows you to preview documents stored in it in image, PDF, or HTML format. This topic covers billing notes, constraints, limitations, and ways to preview documents.​
tip​
This feature is currently in closed beta. Please contact your account manager for access.​
Billing notes​
  • You can preview documents in image, PDF, or HTML format. Billing varies by preview format. Specifically:​
  • ​
    Preview format​
    Billing rules​
    Related documentation​
    Image or PDF​
    Costs are based on the number of images or PDF pages converted for preview.​
    HTML​
    Costs are based on the number of previews.​
    ​
    ​
  • Data retrieval fees will apply when previewing documents stored in Infrequent Access Storage or Flashback Archive. These fees are calculated based on file size.​
Constraints and limitations​
​
Category​
Description​
File type​
The following file types are supported for preview:​
  • Presentation files: PPTX and PPT.​
  • Word processing files: DOCX and DOC.​
  • Spreadsheet files: XLSX and XLS.​
  • Others: PDF.​
Output format​
The following output formats are supported: PNG, JPG, PDF, and HTML.​
warning​
Starting from October 18, 2022, for security and compliance reasons, if you use the bucket's default domain to access web page files with the MIME type text/html and extensions including .htm, .html, .jsp, .plg, .htx, and .stm, the response header will automatically include Content-Disposition:attachment. This means that, when you access web page files via a browser, the website will not preview the content directly. Instead, the content will be downloaded locally.​
File size​
The maximum size of a file that can be previewed is 200 MB.​
Spreadsheet files​
When you preview a spreadsheet file in image format, one sheet can be split into multiple images.​
Server-side encryption​
You can use TOS to preview documents encrypted with SSE-TOS, SSE-C, or SSE-KMS, but there are some limitations to consider:​
  • x-tos-server-side-encryption-customer-algorithm​
  • x-tos-server-side-encryption-customer-key​
  • x-tos-server-side-encryption-customer-key-MD5​
  • You cannot preview documents encrypted with SSE-KMS via anonymous access. To preview SSE-KMS-encrypted documents, you must activate Key Management Service (KMS) and have permission to access the master key. Requests must also be signed using valid credentials. You can use pre-signed URLs, APIs, or SDKs for this purpose. For more information, see the Using REST APIs section below.​
​
Document preview methods​
You can use REST APIs or file URLs to preview documents stored in TOS buckets. TOS lets you preview them as images, PDFs, or HTML.​
tip​
The processed results are returned immediately and are not saved in your bucket.​
  • Using REST APIs ​
  • ​
    GET /example.docx?x-tos-process=doc-preview&x-tos-doc-src-type=docx&x-tos-doc-dst-type=jpg&x-tos-doc-page=1 HTTP/1.1​
    Host: endpoint​
    X-Tos-Content-Sha256: sha256​
    X-Tos-Date: 20220827T132948Z​
    Authorization: authorization​
    ​
  • Using file URLs​
  • http://bucket.endpoint/example.docx?x-tos-process=doc-preview&x-tos-doc-src-type=docx&x-tos-doc-dst-type=jpg&x-tos-doc-page=1​
tip​
To preview private files, use SDKs to generate pre-signed URLs that contain the document preview parameter.​
Document preview features​
​
Feature​
Parameter​
Description​
doc-preview​
Displays documents stored in TOS buckets as images, PDFs, or HTML without opening them.​
​
​
Last updated: 2026.08.20 17:53:16