estoy integrando el plugin jquery file upload plugin y tengo un pequeño problema. Selecciono los ficheros, los copia al servidor, hasta ahí todo bien. El tema es que me da error en el proceso de resize.
En el log del servidor aparece este mensaje:
[Thu Feb 15 18:44:00.204182 2018] [:error] [pid 14559] [client 192.168.0.184:60853] Function not found: imagecreatetruecolor, referer: https://addcloud.addvantage.es/gestorimatges.php
El plugin lo inicializo y configuro de la siguiente manera:
$(function () {
'use strict';
// Initialize the jQuery File Upload widget:
$('#fileupload').fileupload({
url: 'assets/jquery-file-upload/server/php/index.php',
acceptFileTypes: /(\.|\/)(png|jpe?g|tif?f|tif|zip|tar)$/i,
maxFileSize: 524288000, // 500MB = 524288000Byte
limitConcurrentUploads: 3,
disableImageResize: false
});
// Enable iframe cross-domain access via redirect option:
$('#fileupload').fileupload(
'option',
'redirect',
window.location.href.replace(
/\/[^\/]*$/,
'/cors/result.html?%s'
)
);
if (window.location.hostname === 'blueimp.github.io') {
// Demo settings:
$('#fileupload').fileupload('option', {
url: '//jquery-file-upload.appspot.com/',
// Enable image resizing, except for Android and Opera,
// which actually support image resizing, but fail to
// send Blob objects via XHR requests:
disableImageResize: /Android(?!.*Chrome)|Opera/
.test(window.navigator.userAgent),
maxFileSize: 5000000,
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
});
// Upload server status check for browsers with CORS support:
if ($.support.cors) {
$.ajax({
url: '//jquery-file-upload.appspot.com/',
type: 'HEAD'
}).fail(function () {
$('<div class="alert alert-danger"/>')
.text('Upload server currently unavailable - ' +
new Date())
.appendTo('#fileupload');
});
}
} else {
// Load existing files:
$('#fileupload').addClass('fileupload-processing');
$.ajax({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: $('#fileupload').fileupload('option', 'url'),
dataType: 'json',
context: $('#fileupload')[0]
}).always(function () {
$(this).removeClass('fileupload-processing');
}).done(function (result) {
$(this).fileupload('option', 'done')
.call(this, null, {result: result});
});
}
});
En definitiva no sé exactamente el porqué realiza un redim de la imagen si le indico la opción a false.
Alguien podría darme alguna ayuda?
Gracias