Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#arquivo").uploadify({
- 'uploader' : '/scripts/uploadify/uploadify.swf',
- 'script' : '/nasparadas.upload',
- 'cancelImg' : '/scripts/uploadify/cancel.png',
- 'width' : '120',
- 'height' : '30',
- 'wmode' : 'transparent',
- 'fileDataName' : 'imgNoticia',
- 'fileExt' : '*.jpg',
- 'fileDesc' : 'Imagens JPG',
- 'auto' : true,
- 'multi' : false,
- 'removeComplete': false,
- 'buttonText' : 'Arquivo',
- 'onComplete' : function (event, queueID, fileObj, response, data) {
- if (response != "") {
- //alert('Event: '+JSON.stringify(event)+'\nqueueId: '+JSON.stringify(queueID)+'\nfileObj: '+JSON.stringify(fileObj)+'\nResponse: '+JSON.stringify(response)+'\nData: '+JSON.stringify(data));
- $('#campo_arquivo div').html('<img src="/images/nasparadas/'+response+'_n.jpg?w=50&h=50&c=3&cor=000&data='+(new Date()).getTime()+'" alt="">');
- return true;
- }
- },
- 'onError': function (event, queueID, fileObj, errorObj) {
- if (errorObj != "") {
- alert('Erro: '+errorObj.info);
- if (errorObj.info == 552) {
- alert('Você precisa entrar com sua conta para enviar uma foto.');
- } else if (errorObj.info == 553) {
- alert('Envie apenas arquivos .jpg');
- }
- $('#fuFotoPerfil').uploadifyClearQueue();
- return true;
- }
- },
- 'onSelect': function (event, queueID, fileObj) {
- $('#arquivo').uploadifySettings('scriptData', { 'ASPSESSID': user.aspsessid, 'AUTH': user.auth, 'ID': $('#id').val(), 'Token': $('#id').val(), 'modulo': 'nasparadas'});
- }
- });
- $("#destaque").uploadify({
- 'uploader' : '/scripts/uploadify/uploadify.swf',
- 'script' : '/nasparadas.upload',
- 'cancelImg' : '/scripts/uploadify/cancel.png',
- 'width' : '120',
- 'height' : '30',
- 'wmode' : 'transparent',
- 'fileDataName' : 'imgDestaque',
- 'fileExt' : '*.jpg',
- 'fileDesc' : 'Imagens JPG',
- 'auto' : true,
- 'multi' : false,
- 'removeComplete': false,
- 'buttonText' : 'Arquivo',
- 'onComplete' : function (event, queueID, fileObj, response, data) {
- if (response != "") {
- //alert('Event: '+JSON.stringify(event)+'\nqueueId: '+JSON.stringify(queueID)+'\nfileObj: '+JSON.stringify(fileObj)+'\nResponse: '+JSON.stringify(response)+'\nData: '+JSON.stringify(data));
- $('#campo_destaque div').html('<img src="/images/nasparadas/'+response+'_d.jpg?w=50&h=50&c=3&cor=000&data='+(new Date()).getTime()+'" alt="">');
- return true;
- }
- },
- 'onError': function (event, queueID, fileObj, errorObj) {
- if (errorObj != "") {
- alert('Erro: '+errorObj.info);
- if (errorObj.info == 552) {
- alert('Você precisa entrar com sua conta para enviar uma foto.');
- } else if (errorObj.info == 553) {
- alert('Envie apenas arquivos .jpg');
- }
- $('#fuFotoPerfil').uploadifyClearQueue();
- return true;
- }
- },
- 'onSelect': function (event, queueID, fileObj) {
- $('#arquivo').uploadifySettings('scriptData', { 'ASPSESSID': user.aspsessid, 'AUTH': user.auth, 'ID': $('#id').val(), 'Token': $('#id').val(), 'modulo': 'nasparadas'});
- }
- });
Add Comment
Please, Sign In to add comment