Project

General

Profile

Unable to upload file/images, windows machine

Added by Ajay Shankar about 11 years ago

Hi,

I am unable to upload file/images. The current redmine setup is on Windows 7 machine, using Google Chrome browser.

I can see the following error in production.log file :

Saving attachment 'C:/inetpub/CMM/files/130523165819_requirement.doc' (281088 bytes)
Completed 500 Internal Server Error in 35ms

Errno::EACCES (Permission denied - C:/inetpub/CMM/files/130523165819_requirement.doc):
app/models/attachment.rb:103:in `initialize'
app/models/attachment.rb:103:in `open'
app/models/attachment.rb:103:in `files_to_final_location'
lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb:72:in `block in save_attachments'
lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb:68:in `each'
lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb:68:in `save_attachments'
app/controllers/issues_controller.rb:179:in `update'

Started GET "/projects/insider2/files" for 172.16.151.70 at 2013-05-23 16:58:32 +0530
Processing by FilesController#index as HTML
Parameters: {"project_id"=>"insider2"}
Rendered files/index.html.erb within layouts/base (3.0ms)
Completed 200 OK in 72ms (Views: 54.0ms | ActiveRecord: 4.0ms)

Started GET "/projects/insider2/settings" for 172.16.151.70 at 2013-05-23 16:58:36 +0530
Processing by ProjectsController#settings as HTML
Parameters: {"id"=>"insider2"}
Rendered projects/_form.html.erb (13.0ms)
Rendered projects/_edit.html.erb (28.0ms)
Rendered projects/settings/_modules.html.erb (3.0ms)
Rendered projects/settings/_members.html.erb (122.0ms)
Rendered projects/settings/_versions.html.erb (8.0ms)
Rendered projects/settings/_issue_categories.html.erb (7.0ms)
Rendered projects/settings/_boards.html.erb (17.0ms)
Rendered common/_tabs.html.erb (220.0ms)
Rendered projects/settings.html.erb within layouts/base (221.0ms)
Completed 200 OK in 295ms (Views: 278.0ms | ActiveRecord: 12.0ms)

Started GET "/projects/insider2/files" for 172.16.151.70 at 2013-05-23 16:59:00 +0530
Processing by FilesController#index as HTML
Parameters: {"project_id"=>"insider2"}
Rendered files/index.html.erb within layouts/base (2.0ms)
Completed 200 OK in 29ms (Views: 21.0ms | ActiveRecord: 0.0ms)

Started GET "/projects/insider2/files/new" for 172.16.151.70 at 2013-05-23 16:59:03 +0530
Processing by FilesController#new as HTML
Parameters: {"project_id"=>"insider2"}
Rendered attachments/_form.html.erb (2.0ms)
Rendered files/new.html.erb within layouts/base (7.0ms)
Completed 200 OK in 32ms (Views: 28.0ms | ActiveRecord: 2.0ms)

Started POST "/projects/insider2/files" for 172.16.151.70 at 2013-05-23 16:59:43 +0530
Processing by FilesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"P9hGBcnKOQckTLbvlKQAZUQOOOM+grogwAEINMcTIJw=", "version_id"=>"2", "attachments"=>{"1"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0x5872878 @original_filename="requirement.doc", @content_type="application/msword", @headers="Content-Disposition: form-data; name=\"attachments1[file]\"; filename=\"requirement.doc\"\r\nContent-Type: application/msword\r\n", @tempfile=#<File:C:/Windows/Temp/RackMultipart20130523-5476-amzmp5>>, "description"=>"requirement Phase2 Suggestions/Enhancements"}}, "commit"=>"Add", "project_id"=>"insider2"}
Saving attachment 'C:/inetpub/CMM/files/130523165943_requirement.doc' (281088 bytes)
Completed 500 Internal Server Error in 12ms

Errno::EACCES (Permission denied - C:/inetpub/CMM/files/130523165943_requirement.doc):
app/models/attachment.rb:103:in `initialize'
app/models/attachment.rb:103:in `open'
app/models/attachment.rb:103:in `files_to_final_location'
lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb:72:in `block in save_attachments'
lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb:68:in `each'
lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb:68:in `save_attachments'
app/models/attachment.rb:191:in `attach_files'
app/controllers/files_controller.rb:45:in `create'

Any Idea, how to fix this issue?

Thank you,