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

HTML5 Uploader Generates 'HTTP Error' #36

Closed
podblog opened this issue Oct 27, 2012 · 10 comments
Closed

HTML5 Uploader Generates 'HTTP Error' #36

podblog opened this issue Oct 27, 2012 · 10 comments

Comments

@podblog
Copy link

podblog commented Oct 27, 2012

Hi Espen,

I just finished installing Balder at http://tenc.herokuapp.com/ following your guide on:

http://blog.inspired.no/rails-photo-gallery-balder-on-heroku-and-s3-726/

The app itself runs, but I am having upload issues. I've tried everything documented here, but nothing has worked. I also looked at plupload documentation and the documentation doesn't get into your methods (RoR) in any detail.

I intend on uploading my images to S3. I've specified everything in balder.rb in terms of my AWS credentials, and have made the adjustment to force HTML5 uploads.

I know these details are vague but I'm fairly new at using Heroku and Rails, so any assistance is appreciated. I'll gladly provide more details as needed...since I'm not quite sure what you would need from me other than a detailed description?

Thanks for your help...

@podblog
Copy link
Author

podblog commented Oct 29, 2012

I've done a little work since then, it appears the upload might be getting stuck on something related to exiftool. I disabled exiftool per your instructions in the docs, though...

heroku log below:

2012-10-29T06:44:12+00:00 app[web.1]: Started POST "/photos" for 66.176.197.226 at 2012-10-29 06:44:12 +0000
2012-10-29T06:44:12+00:00 app[web.1]:
2012-10-29T06:44:12+00:00 app[web.1]:
2012-10-29T06:44:13+00:00 app[web.1]:
2012-10-29T06:44:13+00:00 app[web.1]:
2012-10-29T06:44:13+00:00 app[web.1]: app/middleware/flash_session_cookie_middleware.rb:16:in call' 2012-10-29T06:44:13+00:00 app[web.1]: 2012-10-29T06:44:13+00:00 app[web.1]: Processing by PhotosController#create as */* 2012-10-29T06:44:13+00:00 app[web.1]: app/controllers/photos_controller.rb:81:increate'
2012-10-29T06:44:13+00:00 app[web.1]: NameError (undefined local variable or method exif_read' for #<Photo:0x0000000532fb40>): 2012-10-29T06:44:13+00:00 app[web.1]: app/controllers/photos_controller.rb:82:inblock in create'
2012-10-29T06:44:13+00:00 app[web.1]: Completed 500 Internal Server Error in 1037ms
2012-10-29T06:44:13+00:00 app[web.1]: Parameters: {"name"=>"t-2700.jpg", "_balder_session"=>"BAh7CUkiD3Nlc3Npb25faWQGOgZFRkkiJWNmMTk4NWNlNDdkZDJkZjlkMmVkMWI4YWY2OWJjOWM2BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMUNIZGwybllJNTgrSUErOGFlaUZMZkJGUG9BMzY4ZFkxbUxnSUcwTWdoQVE9BjsARkkiFXVzZXJfY3JlZGVudGlhbHMGOwBGSSIBgGZmNTM4N2E4YWE4NDA2NjRiNDY1NWVkZjAzOWYyZDlhNjM5YWU2MDc3NzFjYmQ1YzVmMDc5YjYwMzBlNGM0ODI1YWVlYTk0MTIyNzdiY2NjOGZmODU4NTYyNzM2OTYyN2MzNDgxNGM1ZjJhNzZkMmZlZmY5YmMzNzUyMDBjMmU3BjsAVEkiGHVzZXJfY3JlZGVudGlhbHNfaWQGOwBGaQY%3D--569b08b9ae152862f24386d5894e940aefc41408", "authenticity_token"=>"CHdl2nYI58+IA+8aeiFLfBFPoA368dY1mLgIG0MghAQ=", "photo"=>{"album_id"=>"1"}, "file"=>#<ActionDispatch::Http::UploadedFile:0x0000000535b510 @original_filename="t-2700.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name="file"; filename="t-2700.jpg"\r\nContent-Type: image/jpeg\r\n", @tempfile=#File:/tmp/RackMultipart20121029-2-1c0k7rd>}
2012-10-29T06:44:13+00:00 heroku[router]: POST tenc.herokuapp.com/photos dyno=web.1 queue=0 wait=0ms service=2278ms status=500 bytes=728

@espen
Copy link
Owner

espen commented Oct 29, 2012

Try commenting out "before_create :exif_read" in the photo model. I will look into this later but currently too busy with other work.

@podblog
Copy link
Author

podblog commented Oct 29, 2012

This worked. I commented out line 13 in the photo.rb model. Thank you for your help!

@podblog podblog closed this as completed Oct 29, 2012
@espen espen reopened this Nov 1, 2012
@nullmedium
Copy link

I get IO errors when uploading with the HTML5 uploader. The upload stops at 60% or 80%. Depending on the file.

@podblog
Copy link
Author

podblog commented Mar 13, 2013

Have you tried commenting out line 13 in photo.rb? If you are on Heroku, the EXIF module causes problems and isn't really necessary to the successful operation and deployment of Balder.

On Tuesday, March 12, 2013 at 7:55 PM, Jens Luedicke wrote:

I get IO errors when uploading with the HTML5 uploader. The upload stops at 60% or 80%. Depending on the file.


Reply to this email directly or view it on GitHub (#36 (comment)).

@espen
Copy link
Owner

espen commented Mar 13, 2013

@nullmedium where are you storing the files? On disk or S3? Are you using Heroku? Also see the tip above.

@nullmedium
Copy link

@espen On disk. I created an uploads folder within the rails root directory.
In Chrome the uploads aborts and in Safari it stalls. The file is 2 MB in size.

I tried to comment out the line.

Edit: The application is hosted on my own server.

@espen
Copy link
Owner

espen commented Mar 13, 2013

What does the log say? Can you try with another file? And perhaps a smaller file?

@nullmedium
Copy link

I found the problem. The apache process does not the proper permissions to write into the
/tmp/passenger.1.0.17724/generation-0/buffered_uploads directory!

@espen
Copy link
Owner

espen commented Mar 13, 2013

Good to hear you fixed it :)

@espen espen closed this as completed Sep 11, 2013
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