diff --git a/problem/views/admin.py b/problem/views/admin.py index 1549f53a..af66dc3d 100644 --- a/problem/views/admin.py +++ b/problem/views/admin.py @@ -676,8 +676,10 @@ class FPSProblemImport(CSRFExemptAPIView): with tempfile.NamedTemporaryFile("wb") as tf: for chunk in file.chunks(4096): tf.file.write(chunk) + tf.file.flush() os.fsync(tf.file) + problems = FPSParser(tf.name).parse() else: return self.error("Parse upload file error")