is it possible to set a predefined upload directory (which can't be changed by admin / user)?
I'm using OC 1.5.6.4. and try to code a extension.
In my tpl file is the following script:
Code: Select all
<script type="text/javascript"><!--
function image_upload(field, thumb) {
$('#dialog').remove();
$('#content').prepend('<div id="dialog" style="padding: 3px 0px 0px 0px;"><iframe src="index.php?route=common/filemanagerdoc&token=<?php echo $token; ?>&field=' + encodeURIComponent(field) + '" style="padding:0; margin: 0; display: block; width: 100%; height: 100%;" frameborder="no" scrolling="auto"></iframe></div>');
$('#dialog').dialog({
title: 'File Manager',
close: function (event, ui) {
if ($('#' + field).attr('value')) {
$.ajax({
url: 'index.php?route=common/filemanagerdoc/files&token=<?php echo $token; ?>',
dataType: 'text'
});
}
},
bgiframe: false,
width: 800,
height: 400,
resizable: false,
modal: false,
directory: '<?php echo DIR_IMAGE; ?>data/orderattachment/'
});
};
//--></script>
Hope I described my problem unserstandable?!
Regards
Andreas