Error with the request /upload/files/:id in MySQL #1037
Labels
good first issue
Good for newcomers
issue: bug
Issue reporting a bug
severity: medium
If it breaks the basic use of the product but can be worked around
Informations
What is the current behavior?
Using the request /upload /files/:id with the GET or DELETE methods, the console displays the error:
[2018-04-25T17:46:54.220Z] error select
upload_file.* from
upload_filewhere
upload_file.
_id= '_2' limit 1 - ER_BAD_FIELD_ERROR: Unknown column 'upload_file._id' in'where clause'
Steps to reproduce the problem
Using the request /upload /files/:id with MySQL and the GET or DELETE methods.
http://localhost:1337/upload/files/2 (GET or DELETE)
It shows error 500 and in the console the previous message.
Suggested solutions
In the file "/plugins/upload/config/functions/bootstrap.js" the column is called id, not _id:
I have modified the file "/plugins/upload/services/Upload.js":
Lines (92-94)
by:
Now it works fine with MySQL
The text was updated successfully, but these errors were encountered: