Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 2.09 KB

internal.api.md

File metadata and controls

76 lines (54 loc) · 2.09 KB

File: "s3.server.js" Where: {server}

new fsStore.S3(name, options)  Server

This method S3 is defined in FS.Store

Arguments

  • name {String}
    The store name
  • options {Object}
    • region {String}
      Bucket region
    • bucket {String}
      Bucket name
    • accessKeyId {String} (Optional) AWS IAM key; required if not set in environment variables
    • secretAccessKey {String} (Optional) AWS IAM secret; required if not set in environment variables
    • ACL {String} (Default = 'private') ACL for objects when putting
    • folder {String} (Default = '/') Which folder (key prefix) in the bucket to use
    • beforeSave {Function} (Optional) Function to run before saving a file from the server. The context of the function will be the FS.File instance we're saving. The function may alter its properties.
    • maxTries {Number} (Default = 5) Max times to attempt saving a file

Returns {FS.StorageAdapter} An instance of FS.StorageAdapter.

Creates an S3 store instance on the server. Inherits from FS.StorageAdapter type.

FS.Store.S3 = function(name, options) { ... s3.server.js:64


File: "s3.client.js" Where: {client}

new fsStore.S3(name, options)  Client

This method S3 is defined in FS.Store

Arguments

  • name {String}
    The store name
  • options {Object}
    • beforeSave {Function} (Optional) Function to run before saving a file from the client. The context of the function will be the FS.File instance we're saving. The function may alter its properties.
    • maxTries {Number} (Default = 5) Max times to attempt saving a file

Returns {undefined}

Creates an S3 store instance on the client, which is just a shell object storing some info.

FS.Store.S3 = function(name, options) { ... s3.client.js:13