Post by ab-oc » Thu Sep 01, 2016 3:58 am

Hello,

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>
So the directory is predefined, but user / admin can change the directory...
Hope I described my problem unserstandable?!

Regards

Andreas

New member

Posts

Joined
Tue Apr 29, 2014 11:22 pm
Who is online

Users browsing this forum: Google [Bot] and 22 guests