Project

General

Profile

errors when i "uploads" files with API

Added by Louis Lemasson almost 3 years ago

hello,

I got an error 500 (server) when i try an "uploads" command to attach files and i don't understand why, the others command like post issues or get projects are working.

I use POST, application/octet-stream, ..., all is fine but i get an error... Maybe it's the body ? can i have more explication on the "request body is the file content" ? what it should be, for example, for a text file and an image file ? there are any formalities, any structure for the body and the content file ?

help me pleeeaaase, I have been on it for a long time, i will cry... hahaha

don't hesitate to ask me more precisions

i use Windev 23 to use the API.

Environment:
Redmine version 4.1.1.stable
Ruby version 2.5.8-p224 (2020-03-31) [x86_64-linux]
Rails version 5.2.4.2
Environment production
Database adapter PostgreSQL
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.10.4
Mercurial 4.8.2
Cvs 1.12.13
Bazaar 2.8.0
Git 2.20.1
Filesystem
Redmine plugins:
redmine_dropbox_attachments 2.2.1
redmine_favorite_projects 2.1.1

PS : i'm sorry my english is not perfect, i'm french.


Replies (4)

RE: errors when i "uploads" files - Added by Waldinei Bispo de Lima almost 3 years ago

Check log /var/log/apache2/error.log
post here!

only last error.

RE: errors when i "uploads" files with API - Added by Louis Lemasson almost 3 years ago

i got this :

Started POST "/uploads.xml?filename=amongus.jpg" for 2a01:e0a:1d5:ccf0:4c30:4e22:60ca:9747 at 2021-06-29 11:05:44 +0200
Processing by AttachmentsController#upload as XML
Parameters: {"filename"=>"amongus.jpg"}
Current user: llemasson (id=321)
Completed 500 Internal Server Error in 5ms (ActiveRecord: 2.3ms)

NoMethodError (undefined method `split' for nil:NilClass):

plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:58:in `prepare_dropbox_redirect'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

RE: errors when i "uploads" files with API - Added by Louis Lemasson almost 3 years ago

it means that the plugin "redmine_dropbox_attachments 2.2.1" is the problem ?

RE: errors when i "uploads" files with API - Added by Lorenzo Meneghetti almost 3 years ago

Louis Lemasson wrote:

it means that the plugin "redmine_dropbox_attachments 2.2.1" is the problem ?

Hi. Yes it is.
Lorenzo

    (1-4/4)