-
☆ A M B ☆
- 24,524 Posts
Here's one way to use the Amazon S3 Media Source type to serve files.
You'll need a working Amazon S3 account.
Create your Media Source (Tools -> Media Sources) using the Amazon S3 type. You'll need your keys and the URL to your bucket. Test it by using the Media Source entry in the Files tab. You should be able to see the files in the bucket, and to upload, delete and drag-and-drop files to get the URL inserted wherever you want it. You may need to adjust the permissions on your bucket and possibly on the files in your Amazon S3 control panel.
Create custom Content Types (System -> Content Types) for each type of file you'll be serving. For example, for .pdf files, create a PDF type with a mime type of application/pdf, a file extension of .pdf, set it to be binary.
For each file, create a Weblink. In its Settings tab, set its Content Type to be the custom type for the file (for example, PDF for .pdf files), and its Content Disposition to Attachment.
Open the Media Source in the Files tab. Drag the file you want to link to over to the Summary field. Now copy/paste that into the Weblink field. (for some reason it won't drop directly into the Weblink field).
Now you can link to your Weblink instead of directly to the file, as well as providing all the other resource fields for searching, tagging, and anything else you want to do with it.
[ed. note: sottwell last edited this post 13 years, 1 month ago.]