download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

Upload Files as HTML on Amazon S3

Amazon stores the default Metadata information like file type, creation date, modified date, etc. with files which are known as system Metadata. Amazon S3 uses these Metadata. Browsers, usually, do not allow you to open and read files like - doc, gif etc., and if you want to do so, you need to download the files first. Bucket Explorer allows its users to have an upload option, that is - " Upload as HTML ", by which you can easily open and read such files on the browser without downloading them. All you have to do is just upload the files as HTML. This will change the Content-Type of the file as text/html .

You can upload file as HTML on Amazon S3, by sending HTTP PUT Request to Amazon S3 Server, in one of the two following ways:

  1. Upload files as HTML using Amazon S3 REST API - "PUT Object" Being a programer you can write your own code to Upload files as HTML using AWS S3 REST or SOAP API. In this documentation, we are explaining about the REST APIs only, you can refer to AWS S3 documentation for SOAP APIs. You will need to write code to upload files as HTML with the PUT Object API.
  2. Create new Bucket using Bucket Explorer : If you do not want to write code, you can easily Upload files as HTML with Bucket Explorer using few mouse clicks.

1. Upload files as HTML using Amazon S3 REST API - PUT Object

To upload S3 objects as HTML, you can request PUT Object. For that, you need to specify content-type as HTML in Request Headers.


PUT / ObjectName HTTP/1.1
Host: BucketName
Date: date
Authorization: signatureValue
Content-Type: text/html

2. Upload files as HTML using Bucket Explorer

Follow these steps to upload files as HTML:
  1. Run Bucket Explorer.
  2. Select a bucket.
  3. Select the file(s) from the local file system, and right click to choose the option " Upload as HTML ".
  4. After successfully uploading the file, you will find Metadata as Content-Type - text/html .

Note: You can update the Metadata of Amazon S3 file as Content-Type - text/html using ' Update Metadata ' option in properties window of file. You will be able to read the file on the browser. But in the case of new uploading files, Bucket Explorer allows you to upload files as HTML in order to open and read files on the browser without downloading them.