application/js/sharded_upload.js in spontaneous-0.2.0.alpha2 vs application/js/sharded_upload.js in spontaneous-0.2.0.alpha3
- old
+ new
@@ -86,11 +86,11 @@
this.uploader.upload_progress(this);
},
onload: function(event) {
},
onloadend: function(event) {
- console.error('Shard#onloadend: shard upload failed', event);
+ console.log('Shard#onloadend: shard upload complete', event);
},
onreadystatechange: function(event) {
var xhr = event.currentTarget;
if (xhr.readyState == 4) {
if (xhr.status === 200) {
@@ -138,10 +138,10 @@
var form = new FormData();
form.append('field', this.field_name);
form.append('version', this.target_version);
form.append('shards', this.hashes().join(','));
form.append('mime_type', this.mime_type());
- form.append('filename', this.file.fileName);
+ form.append('filename', File.filename(this.file));
this.post(this.path(), form);
},
path: function() {
return ["/shard/replace", this.target_id].join('/');
},