From 2a5bcbe7219e52dfd66ab54454ea87fa20d3c8df Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 29 Jun 2010 04:00:01 +0200 Subject: change target directory for uploads when changing folders in web-frontend --- js/filebrowser.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/filebrowser.js') diff --git a/js/filebrowser.js b/js/filebrowser.js index 9900ce69902..aae6cdf7720 100755 --- a/js/filebrowser.js +++ b/js/filebrowser.js @@ -309,6 +309,9 @@ OC_FILES.browser.show_callback=function(content){ OC_FILES.browser.breadcrumb.show(null,dir); OC_FILES.browser.files.show(null,content); } + if(OC_FILES.uploadForm){ + OC_FILES.uploadForm.setAttribute('action','files/upload.php?dir='+dir); + } } OC_FILES.browser.handleDropOn=function(event,node){ @@ -437,7 +440,7 @@ OC_FILES.browser.showuploader=function(dir,parent,max_upload){ file.name='file'; file.setAttribute('id','fileSelector'); file.setAttribute('type','file'); - file.addEvent('onchange',OC_FILES.upload,[dir,iframeId]); + file.addEvent('onchange',OC_FILES.upload,[iframeId]); OC_FILES.uploadForm.appendChild(document.createTextNode('Upload file: ')); OC_FILES.uploadForm.appendChild(file); parent.appendChild(OC_FILES.uploadForm); -- cgit v1.2.3