【问题标题】:Ngx-uploader responsesNgx-uploader 响应
【发布时间】:2018-06-01 05:23:36
【问题描述】:

使用ngx-uploader 时,我应该在成功/不成功的文件上传时返回什么响应(JSON 和 HTTP 状态)?

例如。

HTTP 401
{{error: {code: 5; message: Not authorized}}

【问题讨论】:

    标签: php angular file-upload ngx-uploader


    【解决方案1】:

    我尝试在demo上上传,脚本返回了上传文件的json:

    [{
        "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
    }]
    

    【讨论】:

      猜你喜欢
      • 2018-04-15
      • 2017-05-26
      • 2019-04-09
      • 1970-01-01
      • 2022-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-29
      相关资源
      最近更新 更多