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

Uploaded Image Corrupted with JRuby 1.7.10 #37

Open
jimtsay opened this issue Feb 4, 2014 · 5 comments
Open

Uploaded Image Corrupted with JRuby 1.7.10 #37

jimtsay opened this issue Feb 4, 2014 · 5 comments

Comments

@jimtsay
Copy link

jimtsay commented Feb 4, 2014

For those using JRuby. Image upload may not work with this gem.
Try the following code on JRuby:

f = File.open("test.png")
obj = f.read(f.size)

f.size and obj.size are not the same. It causes content-length and stream size not the same, and image file is corrupted.

@sodabrew
Copy link

With which version(s) of JRuby are you seeing this problem?

@jimtsay
Copy link
Author

jimtsay commented Sep 13, 2015

It's in the title. I didn't try any new version since then.

@sodabrew
Copy link

Oh, yes it is. I missed that. Was hoping to that a newer version of JRuby since the issue was filed would have fixed the problem, but don't know.

@jimtsay
Copy link
Author

jimtsay commented Sep 13, 2015

@sodabrew I am not using JRuby for a long time. Are you still seeing this in the latest JRuby? I had a workaround for this issue at that time.

@ioquatix
Copy link
Member

ioquatix commented May 3, 2017

It would be good to make a spec for this to confirm correct behaviour - PR welcome.

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

3 participants