UploadedFile should support a callback for upload progress
[WebKit.git] / Websites / perf.webkit.org / public / v3 / models / uploaded-file.js
index f401384..fd1c693 100644 (file)
@@ -12,9 +12,9 @@ class UploadedFile extends DataModelObject {
         this.ensureNamedStaticMap('sha256')[object.sha256] = this;
     }
 
-    static uploadFile(file)
+    static uploadFile(file, uploadProgressCallback = null)
     {
-        return PrivilegedAPI.sendRequest('upload-file', {'newFile': file}, {useFormData: true}).then((rawData) => {
+        return PrivilegedAPI.sendRequest('upload-file', {'newFile': file}, {useFormData: true, uploadProgressCallback}).then((rawData) => {
             return UploadedFile.ensureSingleton(rawData['uploadedFile'].id, rawData['uploadedFile']);
         });
     }