Skip to content

Commit

Permalink
fix for upload: .Directory cleanup hadn't happen in there :-(
Browse files Browse the repository at this point in the history
  • Loading branch information
GerHobbelt committed Apr 30, 2011
1 parent 51d914e commit 1f1de44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
11 changes: 5 additions & 6 deletions Source/NoFlash.Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,26 +200,25 @@ FileManager.implement({
if (response && !response.status)
{
mfm.showError('' + response.error);
mfm.load(mfm.CurrentDir.path);
}
else if (response)
{
mfm.onShow = true; // why exactly do we need to set this, what purpose does the default of NOT preselecting the thing we asked to preselect have?

// Why the Hell a regex replace on Directory???
//mfm.load(mfm.Directory.replace(/\/$/, ''), response.name ? response.name : null);
mfm.load(mfm.Directory, (response.name ? response.name : null));
// mfm.onShow = true; // why exactly do we need to set this, what purpose does the default of NOT preselecting the thing we asked to preselect have?
mfm.load(mfm.dirname(response.path), response.name);
}
else
{
this.showError('bugger! No JSON response!');
mfm.load(mfm.CurrentDir.path);
}
}
catch(e)
{
// Maybe this.contentDocument.documentElement.innerText isn't where we need to look?
//debugger;
mfm.diag.log('noFlashUpload: document innerText grab FAIL:', e, this, tx_cfg);
mfm.load(mfm.Directory);
mfm.load(mfm.CurrentDir.path);
}

mfm.make_file_input(f);
Expand Down
5 changes: 1 addition & 4 deletions Source/Uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,6 @@ FileManager.implement({
var cnt = self.upload.list.getElements('li').length;
var fcnt = self.swf.fileList.length;
self.diag.log('upload:onComplete for FILE', file_obj, cnt, fcnt);
//self.onShow = true;
//self.load(self.Directory, self.lastFileUploaded);
//// self.fillInfo();
}
});

Expand Down Expand Up @@ -343,7 +340,7 @@ FileManager.implement({
// add a 5 second delay when there were upload errors:
(function() {
this.onShow = true;
this.load(this.Directory, this.lastFileUploaded);
this.load(this.CurrentDir.path, this.lastFileUploaded);
// this.fillInfo();
}).bind(this).delay(this.error_count > 0 ? 5500 : 1);
}.bind(this),
Expand Down

0 comments on commit 1f1de44

Please sign in to comment.