Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Sample HTML #27

Open
Open

Description

@brunoimbrizi

FileReader looks great, but I can't get it working. I only go as far as:
["debugMode : ", true]
["SWF FileAPI ready!"]

My on("change") function never gets called. I'm missing something. Maybe I've added $("element").fileReader( options ) to the wrong DOM element? Don't know.

I think it would help me and other users to get it straight away if you provide a sample HTML file with the code. Thanks a lot!

Activity

  1. kevin-terry commented on Feb 26, 2013

    @kevin-terry

    Agreed. A working demo would be great.

    I can get as far as

    ["SWF FileAPI ready!"]
    [FileInput Event Click[object object]]
    ["Browsing..."]

    however the file browser never displays.

  2. craigspaeth commented on Apr 2, 2013

    @craigspaeth

    +1

  3. cburgmer commented on Apr 11, 2013

    @cburgmer

    If somebody want's to compile a demo, here's what I needed to do:

    In index.html:

        <script type="text/javascript" src="fileupload/jquery-1.9.1.min.js"></script>
        <script type="text/javascript" src="fileupload/swfobject.js"></script>
        <script type="text/javascript" src="fileupload/jquery.FileReader.js"></script>
    
        …
    
        <input id="fileToUpload" type="file"/>
    

    In the script:

        $("#fileToUpload").fileReader({
            filereader: 'fileupload/filereader.swf',
            debug: true
        });
        $("#fileToUpload").on("change", function (e) {
            console.log(e.target.files);
        });
    
  4. LekovicMilos commented on Jul 8, 2013

    @LekovicMilos

    Where is that swfobject.js file? I can see only jquery.FileReader.js and filereader.swf.
    Obviously, it can't work without that file, because when I just include jquery.FileReader.js, copy that script below with changing fileToUpload with id of my input file tag id, I just get console.log. When I fire my script after that, nothing happens. Just in Chrome, Opera and Firefox. Can anyone help me how can I use this plugin with my project, which is written in RoR?

  5. cburgmer commented on Jul 8, 2013

    @cburgmer

    Do you mean where to get it from? http://code.google.com/p/swfobject/

  6. LekovicMilos commented on Jul 9, 2013

    @LekovicMilos

    Ok, now I included swfobject.js too, but it's still not working. Is that everything I have to do for my code to start working?

  7. karan3112 commented on Apr 22, 2014

    @karan3112

    Hi, Here is my initialization code :
    $(selector).fileReader({
    id : flash_div_selector,
    filereader : 'filereader.swf',
    expressInstall: 'expressInstall.swf',
    callback : function(){
    //Doing stuff on change using evt.target.files
    }
    });
    I am displaying the selected image for cropping. The issue is I am not able to upload the file to server because of the flash object. The value of the input box is null in IE 9.

  8. divyenduz commented on Jul 15, 2014

    @divyenduz

    Can I use a html buttons on click event to click on the SWF version of file upload. It looks ugly on IE. Let me know a way in which that can be done. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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