mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
change target directory for uploads when changing folders in web-frontend
This commit is contained in:
parent
0ba0f22627
commit
2a5bcbe721
2 changed files with 7 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ OC_FILES.get=function(dir,file){
|
|||
window.location='files/api.php?action=get&dir='+encodeURIComponent(dir)+'&file='+encodeURIComponent(file);
|
||||
}
|
||||
|
||||
OC_FILES.upload=function(dir,iframeId){
|
||||
OC_FILES.upload=function(iframeId){
|
||||
var dir=OC_FILES.dir;
|
||||
var file=new Object;
|
||||
var fileSelector=document.getElementById('fileSelector');
|
||||
var max_upload=document.getElementById('max_upload').value;
|
||||
|
|
@ -110,8 +111,7 @@ OC_FILES.upload=function(dir,iframeId){
|
|||
if(fileSelector.files && fileSelector.files[0].type){
|
||||
var mime=fileSelector.files[0].type;
|
||||
}
|
||||
file.dir=dir;
|
||||
file.dir=dir;
|
||||
file.dir=OC_FILES.dir;
|
||||
file.name=name;
|
||||
file.type='file';
|
||||
file.size=size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue