2013-03-11 9 views
5

मुझे पेपरक्लिप के साथ कुछ समस्याएं हैं। जब मेरे पास आकार (स्केल और फसल करने के लिए) "#" होता है, तो मुझे 422 त्रुटि मिलती है। कुछपेपरक्लिप 422 त्रुटि

has_attached_file :image, 
    :styles => { 
    :medium => "300x300#", 
    :thumb => "100x100>", 
    :standard => "150x150>" 
    }, 
    :storage => :s3, 
    :s3_credentials => "#{Rails.root}/config/s3.yml", 
    :bucket => "convertkit", 
    :s3_protocol => "https" 

मुझे याद आ रही:

Command :: convert '/tmp/**** (20130110)20130311-13571-xxasmt.png[0]' -auto-orient -resize "150x150#" '/tmp/**** (20130110)20130311-13571-xxasmt20130311-13571-1anrx0y' 
[paperclip] An error was received while processing: #<Paperclip::Error: There was an error processing the thumbnail for **** (20130110)20130311-13571-xxasmt> 
Completed 422 Unprocessable Entity in 2785ms (Views: 0.8ms | ActiveRecord: 9.1ms) 

यह मॉडल में मेरी पेपरक्लिप कोड है: मेरा लॉग यह कहते हैं?

+0

अपने ऐप सर्वर के stderr लॉग की जांच करें। इमेजमैजिक की कन्वर्ट यूटिलिटी से कुछ आउटपुट होने की संभावना है कि यह संकेत मिलता है कि इसे संसाधित क्यों नहीं किया जा सकता है। –

+0

stderr लॉग कहां है? –

+0

यह आपके वेबसर्वर और ओएस पर निर्भर करता है। Redhat-ish OSes पर अपाचे के लिए, उदाहरण के लिए, यह '/ var/log/httpd/error_log' होगा। –

उत्तर

0
has_attached_file :avatar, 
       :styles => { 
          :thumb => "60x60>", :medium => "120x120>", 
          :original => "100%", small2: "65x65>", medium2: "144x144>" 
          }, 
          :storage => :s3, 
          :s3_credentials => "#{::Rails.root.to_s}/config/aws.yml", 
          :s3_permissions => "public-read", 
          :url => ':s3_alias_url', 
          :path => "/slider/:attachment/:id_partition/:style/:filename", 
          :s3_host_alias => Settings.cloud_front_url, 
          :s3_protocol => :https, 
          :s3_headers => {'Expires' => (Time.now + 6060243012).httpdate}, 
          default_url: "paperclip_default/slider/:style_missing.png" 
+0

यह मेरे लिए ठीक काम करता है – 120sturm

+0

कृपया अपने उत्तर का स्वरूपण संपादित करें! – jogo

संबंधित मुद्दे