Commit 8aef6a0e by kimth

Ajax doesn't complain about FormData if there's no file to be uploaded

parent 8eff9f7c
......@@ -56,8 +56,13 @@ class @Problem
check_fd: =>
Logger.log 'problem_check', @answers
# If there are no file inputs in the problem, we can fall back on @check
if $('input:file').length == 0
@check()
return
if not window.FormData
alert "Sorry, your browser does not support file uploads. If you can, please use Chrome or Safari which have been verified to support this feature."
alert "Sorry, your browser does not support file uploads. Your submit request could not be fulfilled. If you can, please use Chrome or Safari which have been verified to support file uploads."
return
fd = new FormData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment