Skip to content

how to use url #10

@mradfo21

Description

@mradfo21

hey there! I've been going over what your doing and im a bit confused as to what kind of data the ID3 class is expecting.

for example, ive got a file input called "fileselect" which im manipulating through jquery:

//functions that get called second

function getDataURL(file, callback){
    reader = new FileReader();
    reader.onload = function(){
        callback(reader.result)
        };
    reader.readAsDataURL(file)
}

function fileLoadCallback(file){console.log(file)}

// heres the jquery that gets called first

jQuery("#fileselect").change(function(){
    file = this.files[0]
    getDataURL(file, fileLoadCallback)


})

and i was hoping to put the ID3 stuff into the callback for the onChange. However, im not sure what the ID3 class is expecting from a url (im testing all of this locally btw). i thought it would want the DataURL generated by readAsDataURL, however, when i give it that, nothing happens. btw the callback looks like this with ID3:

function fileLoadCallback(file){
    console.log(file)
    ID3.loadTags(file,function(){
        var tags = ID3.getAllTags(file);
        console.log(tags.artist)
    })
}

So what kind of URL is it expecting?

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