ajax.file_upload() no longer accepts a python dictionary as the data parameter, only accepts an ajax.form_data() object
benjie-git opened this issue · comments
Not sure if this is intended or not. It's easy to work around, but is a change that no longer matches the docs.
# This used to work, but no longer does
ajax.file_upload(apiURL, file, field_name="data", data={"param1": p1, "param2": p2}, oncomplete=on_complete)
# It complains that an ajax.form_data is required instead
# This still works
form_data = ajax.form_data()
form_data.append("param1", p1)
form_data.append("param2", p2)
ajax.file_upload(apiURL, file, field_name="data", data=form_data, oncomplete=on_complete)