Options
All
  • Public
  • Public/Protected
  • All
Menu

Provide storage methods to use AWS S3

Hierarchy

  • StorageClass

Index

Constructors

constructor

Properties

vault

Methods

Private _ensureCredentials

  • _ensureCredentials(): any

configure

  • configure(options?: any): any
  • Configure Storage part with aws configuration

    Parameters

    • Optional options: any

    Returns any

    • Current configuration

get

  • get(key: string, options?: any): Promise<String | Object>
  • Get a presigned URL of the file or the object data when download:true

    Parameters

    • key: string

      key of the object

    • Optional options: any

    Returns Promise<String | Object>

    • A promise resolves to Amazon S3 presigned URL on success

getModuleName

  • getModuleName(): string

list

  • list(path: any, options?: any): Promise<any>
  • List bucket objects relative to the level and prefix specified

    Parameters

    • path: any

      the path that contains objects

    • Optional options: any

    Returns Promise<any>

    • Promise resolves to list of keys for all objects in path

put

  • put(key: string, object: any, options?: any): Promise<Object>
  • Put a file in S3 bucket specified to configure method

    Parameters

    • key: string

      key of the object

    • object: any

      File to be put in Amazon S3 bucket

    • Optional options: any

    Returns Promise<Object>

    • promise resolves to object on success

remove

  • remove(key: string, options?: any): Promise<any>
  • Remove the object for specified key

    Parameters

    • key: string

      key of the object

    • Optional options: any

    Returns Promise<any>

    • Promise resolves upon successful removal of the object