Closed JackDan9 closed 4 years ago
Shouldn't you move the build part in the loop?
issue = client.Issue.find('CSE-2061')
attachments_path.each do|attachment_path|
attachment = issue.attachments.build
attachment.save('file': attachment_path)
end
I assume my answer solved your issue.
attachment_path like this
"/opt/nginx/html/redmine-3.4.0/files/2020/09/200912205657_511bf29db480696c91e678996626f5c6.png"
But i just upload a single file, my attachment information like this:
"/opt/nginx/html/redmine-3.4.0/files/2020/09/200911200343_640.png" is my first file.
Please give me a hand to solve this question! Thanks!