Reputation: 96
I'm trying to add an issue with a file attachment but the response token is not complete.
It is the same error as http://www.redmine.org/boards/2/topics/42425 (5 years old question) but there is no response there.
The redmine used is a 3.2.1.stable.
I'm using https://www.redmine.org/projects/redmine/wiki/Rest_api#Attaching-files to know how to upload files, but when I do a POST
to /uploads.json?filename=myFileName
, the response is something like {"upload":{"token":"6898."}}
The response code is still a 201, so it doesn't seem like there is an error.
The response to the API call should be something like {"upload":{"token":"7167.ed1ccdb093229ca1bd0b043618d88743"}}
.
I tried using the partial token returned, to no avail. Anyone have an idea as to why the token is not okay / how to correct the problem?
Upvotes: 0
Views: 1558
Reputation: 96
In fact, the problem was that the file sent was empty.
This answer may well be of help to someone.
Upvotes: 0
Reputation: 1578
For some reason Redmine
can't copy uploaded file to persistent (final) location. Maybe there's a lack of disk space, maybe there are some issues with file name. Check your environment.log for
"Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)"
when the file is being uploaded. Maybe this will indicate the reason.
Upvotes: 1