How to use the @aws-amplify/storage.list function in @aws-amplify/storage

To help you get started, we’ve selected a few @aws-amplify/storage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-js / packages / aws-amplify-react / src / Storage / S3Album.js View on Github external
list() {
        const { path, level, track, identityId } = this.props;
        logger.debug('Album path: ' + path);
        if (!Storage || typeof Storage.list !== 'function') {
            throw new Error('No Storage module found, please ensure @aws-amplify/storage is imported');
        }
        return Storage.list(path, { level: level? level : 'public', track, identityId })
            .then(data => {
                logger.debug('album list', data);
                this.marshal(data);
            })
            .catch(err => {
                logger.warn(err);
                return [];
            });
    }

@aws-amplify/storage

Storage category of aws-amplify

Apache-2.0
Latest version published 3 days ago

Package Health Score

92 / 100
Full package analysis

Similar packages