Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3977220
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:53:52+00:00 2026-05-20T04:53:52+00:00

I am not sure what’s causing this and would love some insight: Started POST

  • 0

I am not sure what’s causing this and would love some insight:

Started POST "/uploads.js" for 127.0.0.1 at 2011-02-21 09:14:36 -0500
  Processing by UploadsController#create as JS
  Parameters: {"name"=>"DSC_0561.JPG", "chunk"=>"0", "chunks"=>"1", "upload"=>{"stage_id"=>"16"}, "authenticity_token"=>"SfNGZm4lP56eG94OliSo2Kk9Tikg+X2pHaGoRLdbUmg=", "file"=>#<ActionDispatch::Http::UploadedFile:0x000001080f7ce8 @original_filename="DSC_0561.JPG", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"DSC_0561.JPG\"\r\nContent-Type: application/octet-stream\r\n", @tempfile=#<File:/var/folders/+u/+u1vHpefHhSOuO43TGuqe++++TI/-Tmp-/RackMultipart20110221-9189-1ig5c62>>}

[paperclip] identify -format %wx%h '/var/folders/+u/+u1vHpefHhSOuO43TGuqe++++TI/-Tmp-/stream20110221-9189-1o6ij3e.JPG[0]' 2>/dev/null
[paperclip] convert '/var/folders/+u/+u1vHpefHhSOuO43TGuqe++++TI/-Tmp-/stream20110221-9189-1o6ij3e.JPG[0]' -resize "64x64" '/var/folders/+u/+u1vHpefHhSOuO43TGuqe++++TI/-Tmp-/stream20110221-9189-1o6ij3e20110221-9189-kssuro' 2>/dev/null
Completed 422 Unprocessable Entity in 1143ms (Views: 0.8ms | ActiveRecord: 1.5ms)

Not sure if Paperclip is throwing this error, or if it’s ImageMagick or something else.

Edit1: So it seems that it was throwing that error because the file I was uploading had the extension as “.JPG”, and once I changed it to “.jpg” it worked. But I am not sure how to fix that properly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:53:52+00:00Added an answer on May 20, 2026 at 4:53 am

    Rails returning status code 422 means that validation failed so you are probably validating the upload’s content type but it’s always application/octet-stream because whatever you are uploading with isn’t setting it properly.

    You can use the mime-types gem to fix this but ideally you would fix the uploading code to correctly set the mime type.

    mime_types = MIME::Types.type_for(params[:file])
    file.content_type = mime_types.first.to_s if mime_types.first
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not sure if this is possible or if I'm expressing correctly what I'm looking
Not sure how to ask a followup on SO, but this is in reference
Not sure if this is intended behavior or a bug or a wrong function
Not sure exactly how to word this question ... so edits are welcomed! Anyway
Not sure this is a programming question, but we use LaTeX for all our
I´m not sure if this is really a programming question, but it's related to
Not sure where to put this but a site filled with working programmers is
Not sure how else to ask this but, I want to search for a
Not sure how to frame this one, so here goes... I have a need
Not sure of the best way to ask this question other than: I'm writing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.