Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with multiple use of fileReader() ? #42

Open
Epiju opened this issue May 3, 2013 · 1 comment
Open

Bug with multiple use of fileReader() ? #42

Epiju opened this issue May 3, 2013 · 1 comment

Comments

@Epiju
Copy link

Epiju commented May 3, 2013

Hi everyone,

I'm using Jahdrien's FileReader (many thanks!) but I think I have a problem with calling fileReader() multiple times in my JS file.

I'm using it in a Rails app, i'm using CoffeeScript for the JS part. I'm trying to preview images with IE9.

I have multiple input and I'm calling multiple times the function fileReader() but when I do so it seems to break stuff... Do someone had the same issue?

previewImage = (event) ->
 * do stuff *

$input = $("#my_input")
$input.fileReader()
$input.change (event) ->
   previewImage(event)

It works fine.

But then I add :

anotherPreviewImage = (event) ->
 * do stuff *

$anotherInput = $("#my_input2")
$anotherInput.fileReader()
$anotherInput.change (event) ->
   anotherPreviewImage(event)

And the whole thing doesn't work anymore on IE9...

Thanks for helping me!

@emelineL
Copy link

emelineL commented Apr 8, 2014

Hi,

I am experiencing the same kind of trouble.
I instantiate 2 fileReaders on the same page, and only the second one is working.

$('file-uploader-before').fileReader({
     id: 'file-uploader-before-iesupport',
     debugMode: this.DEBUG,
     filereader: '/flash/filereader.swf',
     expressInstall: '/flash/expressInstall.swf'
});
$('file-uploader-after').fileReader({
   id:  'file-uploader-after-iesupport',
   debugMode: this.DEBUG,
   filereader: '/flash/filereader.swf',
   expressInstall: '/flash/expressInstall.swf'
});

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants