Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 2.14 KB

api.md

File metadata and controls

58 lines (39 loc) · 2.14 KB

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

new fsStore.OSS(name, options)  Server

This method OSS is defined in FS.Store

Arguments

  • name {String} The store name
  • options {Object}
    • region {String} Bucket region
    • internal {Boolean} Access OSS from Aliyun internal (uses internal access)
    • bucket {String} Bucket name
    • accessKeyId {String} OSS Access Key ID, required
    • secretAccessKey {String} OSS Access Key Secret, required
    • ACL {String} (Default = 'private') ACL for objects when putting, alloed values are ['private', 'public-read', 'public-read-write']
    • 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 OSS store instance on the server. Inherits from FS.StorageAdapter type.

FS.Store.OSS = function(name, options) { ... aliyun.server.js:74


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

new fsStore.OSS(name, options)  Client

This method OSS 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 OSS store instance on the client, which is just a shell object storing some info.

FS.Store.OSS = function(name, options) { ... aliyun.client.js:20