Skip to content

ionic 2 How to get mimeType from Cordova File Transfer Plugin in ios? #53

@Jayprakashsingh

Description

@Jayprakashsingh

I am developing hybrid mobile application. In one of the scenario we need to fetch mimeType from a file when we select or upload a file.

Android side perfectly work but ios side not working (this.File.resolveLocalFilesystemUrl).ios related solution available or not ?

this.File.resolveLocalFilesystemUrl(fileUri).then((entry: Entry) => {
    if (entry) {
        var fileEntry = entry as FileEntry;
        fileEntry.file(success => { 
            var mimeType = success.type;
        }, error => {
            // no mime type found;
        });        
    }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions