It looks like you're new here. If you want to get involved, click one of these buttons!
<script type="text/javascript">
$(document).ready(function() {
$("#gallery").uploadify({
// Required Settings
id : jQuery(this).attr('id'),
langFile : 'http://www.static-xxx.nu/uploader/uploadifyLang_en.js',
swf : 'http://www.static-xxx.nu/uploader/uploadify.swf',
uploader : '/uploadify/galleri.php',
// Options
auto : false,
buttonCursor : 'pointer',
buttonText : 'Välj Filer', // if not set in main page, will be loaded later via settings.langFile
cancelImage : 'http://www.static-xxx.nu/uploadify-cancel.png',
checkExisting : '/uploader/uploadify-check-existing.php',
debug : true,
fileObjName : 'file',
fileSizeLimit : 0,
fileTypeDesc : 'Bild JPG', // if not set in main page, will be loaded later via settings.langFile
fileTypeExts : '*.jpg',
height : 30,
method : 'post',
multi : true,
queueID : 'fileQueue',
queueSizeLimit : 999,
removeCompleted : true,
removeTimeout : 3,
requeueErrors : true,
postData : {},
preventCaching : true,
progressData : 'all', // 'percentage', 'speed' or 'all'
successTimeout : 30,
transparent : true,
uploadLimit : 999,
width : 120
});
background: transparent url('http://www.static-xxx.nu/uploader/botao_150x30.png') no-repeat center top;
background: transparent url('http://www.static-xxx.nu/uploader/botao_150x30_over.png') no-repeat center top;
<div id="fileQueue"></div>
<div class="buttons" style="margin-top:10px; height:25px;"><button type="button" name="submit" id="submit" onclick="javascript:$('#gallery').uploadifySettings('postData', {'caption' : $('#caption').val(),'color' : $('#color').val(),'mapp' : $('#mapp').val(),'userID' : $('#userID').val(),'userName' : $('#userName').val()}); jQuery('#gallery').uploadifyUpload();"><img src="<?=$static?>/img/arrow_up.png" alt="" />Ladda Upp</button></div>
$file = $_FILES['Filedata']['name'];
$file = utf8_decode($file);
$file = ereg_replace("[^a-zA-Z0-9_.-\[\]()]", "", strtr($file, "()áàâãäéèêëíìîïóòôõöúùûüçÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ% ", "[]aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC__"));
$file = strtolower($file);
just tested and it works just fine, if you upload a file with accent in file name (or other invalid characters), it'll rename the file in uploadify.php to prevent errors... onSelect : function(file,data,response) {
doFormSubmit();
},
function doFormSubmit() {
// GRAB FIELDS VALUES AND SEND TO uploadify.php, YOU CAN DO WHATEVER YOU WANT WITH THEM IN uploadify.php FILE
$('#gallery').uploadifySettings('postData', {'field1':$('#field1').val(),'field2':$('#field2').val(),'field3':$('#field3').val(),'field4':$('#field4').val(),'field5':$('#field5').val()});
// UPLOAD IMAGES
$('#gallery').uploadifyUpload();
}
jQuery.extend(swfuploadify.settings.postData, {filename: file.name}, {"folder":$("[name=folder]").val(), "newFileName":$("[name=newFileName]").val()});
swfuploadify.setPostParams(swfuploadify.settings.postData);
data : {filename: file.name}
data : swfuploadify.settings.postData
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1000000000"/>
</requestFiltering>
</security>
</system.webServer>
<httpRuntime maxRequestLength="2097151" executionTimeout="3600" />
in system.web now allows me to upload up to 2GB in IIS7
// this file must be in UTF-8 format
// L18N by Tamás Vincze
var uploadifyLang = new Array();
uploadifyLang['buttonText'] = 'FÁJLOK KIVÁLASZTÁSA';
uploadifyLang['fileTypeDesc'] = 'Minden fájl (*.*)';
uploadifyLang['replaceMsg1'] = 'A';
uploadifyLang['replaceMsg2'] = 'nevű fájl már a feltöltési listában van';
uploadifyLang['replaceMsg3'] = 'Lecseréli a listában levő fájlt?';
uploadifyLang['existsMsg1'] = 'A';
uploadifyLang['existsMsg2'] = 'nevű fájl már a szerveren van';
uploadifyLang['existsMsg3'] = 'Felülírja a szerveren levő fájlt?';
uploadifyLang['errorMsg1'] = 'Néhány fájl nem került bele a feltöltési listába:';
uploadifyLang['errorMsg2'] = 'A kijelölt fájlok száma nagyobb, mint az összes rendelkezésre álló feltöltési korlát';
uploadifyLang['errorMsg3'] = 'A kijelölt fájlok mérete nagyobb, mint az összes rendelkezésre álló feltöltési méret';
uploadifyLang['errorMsg4'] = 'A';
uploadifyLang['errorMsg5'] = 'nevű fájl mérete nagyobb, mint a maximális fájl méret';
uploadifyLang['errorMsg6'] = 'nevű fájl üres';
uploadifyLang['errorMsg7'] = 'nevű fájl nem engedélyzett típusú';
uploadifyLang['errorString1'] = 'Hiba';
uploadifyLang['errorString2'] = 'HTTP hiba';
uploadifyLang['errorString3'] = 'Hiányzó feltültési URL';
uploadifyLang['errorString4'] = 'IO Hiba';
uploadifyLang['errorString5'] = 'Biztonsági hiba';
uploadifyLang['errorString6'] = 'Meghaladta a feltöltési korlátot';
uploadifyLang['errorString7'] = 'Meghaladja a feltöltési korlátot';
uploadifyLang['errorString8'] = 'Sikertelen';
uploadifyLang['errorString9'] = 'Ismeretlen fájl azonosító';
uploadifyLang['errorString10'] = 'Ellenörzési hiba';
uploadifyLang['errorString11'] = 'Visszavonva';
uploadifyLang['errorString12'] = 'Megállítva';
uploadifyLang['uploadComplete'] = 'Kész';
'fileSizeLimit' : 1*1024*1024, // 1MB
'fileSizeLimit' : 1024, // 1MB
'fileSizeLimit' : 4096, // 4MB
You've got a problem with your JavaScript
$file = ereg_replace("[^a-zA-Z0-9_.-\[\]()]", "", strtr($file, "()áàâãäéèêëíìîïóòôõöúùûüçÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ% ", "[]aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC__"));
with:$file = preg_replace("/[^a-zA-Z0-9_.\-\[\]]/i", "", strtr($file, "()áàâãäéèêëíìîïóòôõöúùûüçÁÀÂÃÄÉÈÊËÍÌÎÏÓÒÔÕÖÚÙÛÜÇ% ", "[]aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC__"));
and you should be fine... I'll change my files here too...
<form id="formUp" name="formUp" method="POST" enctype="multipart/form-data" action="">
<label for="name">Name:<input type="text" id="name" name="name" value="" /></label><br/>
<label for="email">Email:<input type="text" id="email" name="email" value="" /></label><br/>
<input type="file" name="file_upload" id="file_upload" value="" />
<a href="javascript:$('#file_upload').uploadifyUpload();">Upload File</a><br/>
<div id="msguplaud"></div><br/>
<input type="submit" id="submit" value="Submit" name="submit" />
</form>
$("#file_upload").uploadify({
langFile : 'jquery.uploadify-v3.0.0/uploadifyLang_he.js',
swf : 'jquery.uploadify-v3.0.0/uploadify.swf',
uploader : 'jquery.uploadify-v3.0.0/uploadify.php',
'checkExisting' : 'jquery.uploadify-v3.0.0/uploadify-check-exists.php',
'cancelImg' : 'uploadify-cancel.png',
'folder' : 'uploads',
'method' : 'post',
'postData' : {},
'progressData' : 'all',
'auto' : false, // files are automatically uploaded
'multi' : false, // enable several files to upload
'querySizeLimit' : 1,
'fileTypeExts': '*.jpg;*.jpeg;*.gif;*.png',
'fileSizeLimit' : 1*1024*1024, // 1MB
'buttonText' : 'Select a file '
} );
<form id="formUp" name="formUp" method="POST" enctype="multipart/form-data" action="">
<label for="name">Name:<input type="text" id="name" name="name" value="" /></label><br/>
<label for="email">Email:<input type="text" id="email" name="email" value="" /></label><br/>
<input type="file" name="file_upload" id="file_upload" value="" />
<a href="javascript:$('#file_upload').uploadifyUpload();">Upload File</a><br/>
<div id="msguplaud"></div><br/>
<input type="submit" id="submit" value="Submit" name="submit" />
</form>
$("#file_upload").uploadify({
langFile : 'jquery.uploadify-v3.0.0/uploadifyLang_he.js',
swf : 'jquery.uploadify-v3.0.0/uploadify.swf',
uploader : 'jquery.uploadify-v3.0.0/uploadify.php',
'checkExisting' : 'jquery.uploadify-v3.0.0/uploadify-check-exists.php',
'cancelImg' : 'uploadify-cancel.png',
'folder' : 'uploads',
'method' : 'post',
'postData' : {},
'progressData' : 'all',
'auto' : false, // files are automatically uploaded
'multi' : false, // enable several files to upload
'querySizeLimit' : 1,
'fileTypeExts': '*.jpg;*.jpeg;*.gif;*.png',
'fileSizeLimit' : 1*1024*1024, // 1MB
'buttonText' : 'Select a file '
} );
langFile : '/jquery.uploadify-v3.0.0/uploadifyLang_he.js',
swf : '/jquery.uploadify-v3.0.0/uploadify.swf',
uploader : '/jquery.uploadify-v3.0.0/uploadify.php',
'checkExisting' : '/jquery.uploadify-v3.0.0/uploadify-check-exists.php',
'cancelImg' : '/jquery.uploadify-v3.0.0/uploadify-cancel.png',
bccsergio said: hy don't you post a link to your develop area so I can take a look and try to help you?