Permalink
Browse files

fix for upload: .Directory cleanup hadn't happen in there :-(

  • Loading branch information...
1 parent 51d914e commit 1f1de449b047701d31a379e1415b83d0c55eff49 @GerHobbelt GerHobbelt committed Apr 30, 2011
Showing with 6 additions and 10 deletions.
  1. +5 −6 Source/NoFlash.Uploader.js
  2. +1 −4 Source/Uploader.js
View
@@ -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);
View
@@ -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();
}
});
@@ -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),

0 comments on commit 1f1de44

Please sign in to comment.