hayageek / jquery-upload-file

jQuery Upload File plugin provides Multiple file Uploads with progress bar.Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
http://hayageek.com/
MIT License
682 stars 417 forks source link

why on onError doesnt have xhr parameter? #187

Closed azulkipli closed 5 years ago

azulkipli commented 6 years ago

I want to show custom error message from server why on onError doesnt have xhr parameter? this is response format from server

{
    "data": [
        {
            "cluster_id": 6,
            "denom": 10000,
            "description": "",
            "fee1": 0,
            "id": 1892,
            "margin": 0,
            "operator": "Axis",
            "priority": 1,
            "product_biller_id": 1,
            "product_name": "Axis Rp 10.000",
            "purchase_price": 11500,
            "remote_product_id": "0",
            "sell_price": 11000,
            "sku": "AXS10",
            "status": 1
        },
        {
            "cluster_id": 6,
            "created_by": 2,
            "description": "",
            "fee1": 0,
            "margin": 0,
            "priority": 1,
            "product_biller_id": 1,
            "purchase_price": 300000,
            "remote_product_id": "0",
            "sell_price": 300000,
            "sku": "AXZ300",
            "status": 1
        }
    ],
    "errors": [
        "(1062, \"Duplicate entry 'AXZ300-6' for key 'mprice_unique'\")"
    ],
    "jquery-upload-file-error": "broken_messages"
}

how to show property jquery-upload-file-error

hayageek commented 6 years ago

onError callback format is onError(fileArray, httpStatus, msg, pd);

fileArray is the list of files, msg -> is the "jquery-upload-file-error"

sgtcoder commented 1 year ago

MSG is NOT the xhr. It's null.