mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Badge image uploader (#28188)
In the formkit conversion in 2ca06ba2360c200b2be8e0718fcc04c64ca14935 we missed setting a type for the UppyImageUploader for badges. Also, we were not passing down the `image_url` as form data, so when we used `data.image` for that field the badge was not updating in the UI after page loads and the image URL was not loading for preview. Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
@ -56,6 +56,12 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"image_upload_id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"listable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@ -123,7 +129,8 @@
|
||||
"target_posts",
|
||||
"auto_revoke",
|
||||
"show_posts",
|
||||
"badge_type_id"
|
||||
"badge_type_id",
|
||||
"image_upload_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -83,6 +83,12 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"image_upload_id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"badge_type_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
@ -108,7 +114,8 @@
|
||||
"target_posts",
|
||||
"auto_revoke",
|
||||
"show_posts",
|
||||
"badge_type_id"
|
||||
"badge_type_id",
|
||||
"image_upload_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -56,6 +56,12 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"image_upload_id": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"listable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@ -123,7 +129,8 @@
|
||||
"target_posts",
|
||||
"auto_revoke",
|
||||
"show_posts",
|
||||
"badge_type_id"
|
||||
"badge_type_id",
|
||||
"image_upload_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user