cari cari - 20 days ago 6
jQuery Question

How can i set the thumbnail size in blueimp jquery fileupload?

Its crazy, but i was not able to google that.

My call:

$('.fileupload').fileupload({
dataType: 'json',
done: function(e, data) {
$.each(data.result.files, function(index, file) {
// do something with file and index
});
}
});


There should be an option to set thumbnail size somewhere, right?

Thx in advance

cnm cnm
Answer

Are you talking form displaying or the the width of the uploaded img?

To change width/height of uploaded img is very simple: You will find the most options in:

./server/php/UploadHandler.php

there you can change the size of uploaded img on line 146

        'thumbnail' => array(
            // Uncomment the following to use a defined directory for the thumbnails
            // instead of a subdirectory based on the version identifier.
            // Make sure that this directory doesn't allow execution of files if you
            // don't pose any restrictions on the type of uploaded files, e.g. by
            // copying the .htaccess file from the files directory for Apache:
            //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/',
            //'upload_url' => $this->get_full_url().'/thumb/',
            // Uncomment the following to force the max
            // dimensions and e.g. create square thumbnails:
            //'crop' => true,
            'max_width' => 205,
            'max_height' => 155 
        )
Comments