So, this seems to work here. BEWARE: I am not a good programmer!!!
Necessary: - one upload.php script to be put into /tftpboot - some small changes to Digium js files (see diff.patch) Maybe it helps somebody. Comments are welcome. Michael
--- /oldroot/mnt/asturo/stat/var/lib/asterisk/static-http/config/js/backup.js
+++ /oldroot/mnt/asturw/stat/var/lib/asterisk/static-http/config/js/backup.js
@@ -47,7 +47,8 @@
}
upload_Path = top.sessionData.httpConf.uploadPaths['backups'] ;
- var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+ //var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+ var upload_action_path = 'http://'+window.location.hostname+'/upload.php?backups' ;
_$('uploadiframe').contentWindow.document.getElementById('form22').action = upload_action_path ;
_$('uploadiframe').contentWindow.document.getElementById('UploadFORM_UPLOAD_BUTTON').value = 'Upload Backup to Unit' ;
};
--- /oldroot/mnt/asturo/stat/var/lib/asterisk/static-http/config/js/flashupdate.js
+++ /oldroot/mnt/asturw/stat/var/lib/asterisk/static-http/config/js/flashupdate.js
@@ -235,7 +235,8 @@
}
overlay_upload_Path = top.sessionData.httpConf.uploadPaths['backups'] ;
- var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+ //var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+ var upload_action_path = 'http://'+window.location.hostname+'/upload.php?backups' ;
_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('form22').action = upload_action_path ;
_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('UploadFORM_UPLOAD_BUTTON').value = 'Upload OverLay file' ;
};
--- /oldroot/mnt/asturo/stat/var/lib/asterisk/static-http/config/js/menuprompts_upload.js
+++ /oldroot/mnt/asturw/stat/var/lib/asterisk/static-http/config/js/menuprompts_upload.js
@@ -49,7 +49,8 @@
return ;
}
- var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/voicemenuprompts' : '/voicemenuprompts' ;
+ //var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/voicemenuprompts' : '/voicemenuprompts' ;
+ var upload_action_path = 'http://'+window.location.hostname+'/upload.php?voicemenuprompts' ;
_$('uploadiframe').contentWindow.document.getElementById('form22').action = upload_action_path ;
};
--- /oldroot/mnt/asturo/stat/var/lib/asterisk/static-http/config/js/mohfiles.js
+++ /oldroot/mnt/asturw/stat/var/lib/asterisk/static-http/config/js/mohfiles.js
@@ -29,8 +29,9 @@
var onUploadForm_load = function(){
- var tmp_a = (parent.sessionData.httpConf.prefix) ? parent.sessionData.httpConf.prefix : '' ;
- var tmp = (tmp_a) ? '/' + tmp_a + '/' + CURRENTMOH_PATH_PM_NAME : '/' + CURRENTMOH_PATH_PM_NAME ;
+ //var tmp_a = (parent.sessionData.httpConf.prefix) ? parent.sessionData.httpConf.prefix : '' ;
+ //var tmp = (tmp_a) ? '/' + tmp_a + '/' + CURRENTMOH_PATH_PM_NAME : '/' + CURRENTMOH_PATH_PM_NAME ;
+ var tmp = 'http://'+window.location.hostname+'/upload.php?moh' ;
_$('uploadiframe').contentWindow.document.getElementById('form22').action = tmp ;
};
--- /oldroot/mnt/asturo/stat/var/lib/asterisk/static-http/config/upload_abe_overlay.html
+++ /oldroot/mnt/asturw/stat/var/lib/asterisk/static-http/config/upload_abe_overlay.html
@@ -50,7 +50,8 @@
}
overlay_upload_Path = top.sessionData.httpConf.uploadPaths['backups'] ;
- var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+ //var upload_action_path = (top.sessionData.httpConf.prefix) ? '/' + top.sessionData.httpConf.prefix + '/backups' : '/backups' ;
+ var upload_action_path = 'http://'+window.location.hostname+'/upload.php?backups' ;
_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('form22').action = upload_action_path ;
_$('uploadOVERLAY_iframe').contentWindow.document.getElementById('UploadFORM_UPLOAD_BUTTON').value = 'Upload OverLay file' ;
};
<<attachment: upload.php>>
------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________ Astlinux-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [email protected].
