Project

General

Profile

Failed to update attachment

Added by Pok Lau almost 12 years ago

I had a redmine instance in 1.1 and wanted to enjoy the nice functions of uploading attachments to Issues using the API.

I tried to upgraded my instance to latest 1.4.1 version, failed.

So I gone done a harder pathway, merging changes that are related to the upload attachments into my instance.

After doing that I had never have a success, plus the normal attaching files into Issue functionality was not working at all.

I found that the files_to_final_location method in app/model/attachment.rb had never been called (which supposed to be called at before_save)

I printed an inspect of the a object in the save_attachments in acts_as_attachable and this is what I got

#<Attachment id: nil, container_id: 0, container_type: "", filename: "dummy.xlsx", disk_filename: "120514141249_dummy.xlsx", filesize: 82273, content_type: "application/vnd.openxmlformats-officedocument.dummy...", digest: "a9195e3999130903d063edd5683e83b8", downloads: 0, author_id: 3, created_on: nil, description: "">

I know what I'm doing sounds crazy, but any one have any idea what might go wrong/how I can fix it?