Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Ionic2 copyFile moveFile Error, Zone state notScheduled #796

@AUSdomgarcia

Description

@AUSdomgarcia

here's my code either I use copyFile or moveFile it always goes to catch handler outside my promise fuction

moveFileToStorage(uri) {
        const _extension = '.' + this.getFileExtension(uri);
        const _name = this.getFileName(uri) + _extension;
        const _newPath = this.myStoragePath;
        const _newName = 'camera_' + this.hashName() + _extension;
        const _uri = uri.substring(0, uri.lastIndexOf('/') + 1);
        return this.file.moveFile(_uri, _name, _newPath, _newName);
    }

moveFileToStorage(uri).then((res) => { } ).catch( (err) =>{ err } ) <-- goes here catch handler

heres what zone output, actually I don't get what it mean, just a newbie in ionic 2 development.

{"__zone_symbol_currentTask": {"type":"microTask", "state":"notScheduled", "source":"Promise.then", "zone":"angular","cancelFn":null,"runCount"0}}

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions