Module: deluge
Branch: 1.3-stable
Commit: 0b821640bb0da3e748af2f575c1a049733bd3424

Author: Damien Churchill <[email protected]>
Date:   Fri May  6 22:37:42 2011 +0100

fix #1481 file uploads from behind a reverse proxy

---

 deluge/ui/web/js/deluge-all/add/FileWindow.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/add/FileWindow.js 
b/deluge/ui/web/js/deluge-all/add/FileWindow.js
index 632e7a3..2faa3ea 100644
--- a/deluge/ui/web/js/deluge-all/add/FileWindow.js
+++ b/deluge/ui/web/js/deluge-all/add/FileWindow.js
@@ -1,6 +1,6 @@
 /*!
  * Deluge.add.File.js
- * 
+ *
  * Copyright (c) Damien Churchill 2009-2010 <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -51,7 +51,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
        initComponent: function() {
                Deluge.add.FileWindow.superclass.initComponent.call(this);
                this.addButton(_('Add'), this.onAddClick, this);
-               
+
                this.form = this.add({
                        xtype: 'form',
                        baseCls: 'x-plain',
@@ -71,13 +71,13 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
                        }]
                });
        },
-       
+
        // private
        onAddClick: function(field, e) {
                if (this.form.getForm().isValid()) {
                        this.torrentId = this.createTorrentId();
                        this.form.getForm().submit({
-                               url: '/upload',
+                               url: deluge.config.base + 'upload',
                                waitMsg: _('Uploading your torrent...'),
                                failure: this.onUploadFailure,
                                success: this.onUploadSuccess,
@@ -88,7 +88,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
                        this.fireEvent('beforeadd', this.torrentId, name);
                }
        },
-       
+
        // private
        onGotInfo: function(info, obj, response, request) {
                info['filename'] = request.options.filename;
@@ -99,7 +99,7 @@ Deluge.add.FileWindow = Ext.extend(Deluge.add.Window, {
        onUploadFailure: function(form, action) {
                this.hide();
        },
-       
+
        // private
        onUploadSuccess: function(fp, upload) {
                this.hide();

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to