0

What responses (JSON and HTTP statuses) should I return on successful/unsuccessful file uploads when using ngx-uploader?

eg.

HTTP 401
{{error: {code: 5; message: Not authorized}}
takeshin
  • 49,108
  • 32
  • 120
  • 164

1 Answers1

1

I tried to upload on the demo, and the script returned a json of the uploaded files:

[{
    "fieldname":"file",
    "originalname":"25508884_1667581309951575_499158447_o.png",
    "encoding":"7bit",
    "mimetype":"image/png",
    "destination":"/app/dist/api/uploads",
    "filename":"bkjo3l.png",
    "path":"/app/dist/api/uploads/bkjo3l.png",
    "size":1926691
}]
Chin Leung
  • 14,621
  • 3
  • 34
  • 58