Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Alguien me puede apoyar con FancyUpload ?

Estas en el tema de Alguien me puede apoyar con FancyUpload ? en el foro de Frameworks JS en Foros del Web. la documentacion esta muy incompleta... y no tengo muy clara la idea para el uso del FancyUpload... en especifico lo que necesito es "Queued Photo ...
  #1 (permalink)  
Antiguo 11/11/2011, 10:27
 
Fecha de Ingreso: mayo-2011
Mensajes: 167
Antigüedad: 12 años, 11 meses
Puntos: 1
Alguien me puede apoyar con FancyUpload ?

la documentacion esta muy incompleta... y no tengo muy clara la idea para el uso del FancyUpload...

en especifico lo que necesito es "Queued Photo Uploader"

muchas gracias por la ayuda... lo postie en este foro por que utiliza php.. espero no andar equivocado!
  #2 (permalink)  
Antiguo 11/11/2011, 11:07
Avatar de Patriarka  
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 2 meses
Puntos: 288
Respuesta: Alguien me puede apoyar con FancyUpload ?

por que no nos mostras el codigo de tu problema mas facil
  #3 (permalink)  
Antiguo 11/11/2011, 13:53
 
Fecha de Ingreso: mayo-2011
Mensajes: 167
Antigüedad: 12 años, 11 meses
Puntos: 1
Respuesta: Alguien me puede apoyar con FancyUpload ?

al parecer es open source..... todo esta aqui...

http://digitarald.de/project/fancyup...se/photoqueue/

pero el problema es que no hay un zip de descarga... ahi viene todo el codigo... y lo saque integro de ahi... pero a la hora de quererlo hacer funcionar.. me da broncas
  #4 (permalink)  
Antiguo 11/11/2011, 14:11
Avatar de Patriarka  
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 2 meses
Puntos: 288
Respuesta: Alguien me puede apoyar con FancyUpload ?

y bueno segui intentando
no es dificil si ya tenes todo hay,
fijate que tenes que bajar el motools y otras herramientas,
tambien instalate el firebug y fijate los errores que van apareciendo
  #5 (permalink)  
Antiguo 16/11/2011, 00:09
 
Fecha de Ingreso: mayo-2011
Mensajes: 167
Antigüedad: 12 años, 11 meses
Puntos: 1
Respuesta: Alguien me puede apoyar con FancyUpload ?

este es el link de mi proyecto....
http://chivascienega.com/admin/fotos2.php

en el formulario la accion la tiene hacia script.php
el cual vendria siento este....

Código PHP:
Ver original
  1. <?php
  2. /**
  3.  * Swiff.Uploader Example Backend
  4.  *
  5.  * This file represents a simple logging, validation and output.
  6.  *  *
  7.  * WARNING: If you really copy these lines in your backend without
  8.  * any modification, there is something seriously wrong! Drop me a line
  9.  * and I can give you a good rate for fancy and customised installation.
  10.  *
  11.  * No showcase represents 100% an actual real world file handling,
  12.  * you need to move and process the file in your own code!
  13.  * Just like you would do it with other uploaded files, nothing
  14.  * special.
  15.  *
  16.  * @license     MIT License
  17.  *
  18.  * @author      Harald Kirschner <mail [at] digitarald [dot] de>
  19.  * @copyright   Authors
  20.  *
  21.  */
  22.  
  23.  
  24. /**
  25.  * Only needed if you have a logged in user, see option appendCookieData,
  26.  * which adds session id and other available cookies to the sent data.
  27.  *
  28.  * session_name('SID'); // whatever your session name is, adapt that!
  29.  * session_start();
  30.  */
  31.  
  32. // Request log
  33.  
  34. /**
  35.  * You don't need to log, this is just for the showcase. Better remove
  36.  * those lines for production since the log contains detailed file
  37.  * information.
  38.  */
  39.  
  40. $result = array();
  41.  
  42. $result['time'] = date('r');
  43. $result['addr'] = substr_replace(gethostbyaddr($_SERVER['REMOTE_ADDR']), '******', 0, 6);
  44. $result['agent'] = $_SERVER['HTTP_USER_AGENT'];
  45.  
  46. if (count($_GET)) {
  47.     $result['get'] = $_GET;
  48. }
  49. if (count($_POST)) {
  50.     $result['post'] = $_POST;
  51. }
  52. if (count($_FILES)) {
  53.     $result['files'] = $_FILES;
  54. }
  55.  
  56. // we kill an old file to keep the size small
  57. if (file_exists('script.log') && filesize('script.log') > 102400) {
  58.     unlink('script.log');
  59. }
  60.  
  61. $log = @fopen('script.log', 'a');
  62. if ($log) {
  63.     fputs($log, print_r($result, true) . "\n---\n");
  64.     fclose($log);
  65. }
  66.  
  67.  
  68. // Validation
  69.  
  70. $error = false;
  71.  
  72. if (!isset($_FILES['Filedata']) || !is_uploaded_file($_FILES['Filedata']['tmp_name'])) {
  73.     $error = 'Invalid Upload';
  74. }
  75.  
  76.  
  77.  if (!$error && $_FILES['Filedata']['size'] > 2 * 1024 * 1024)
  78. {
  79.     $error = 'Please upload only files smaller than 2Mb!';
  80. }
  81. /**
  82.  * You would add more validation, checking image type or user rights.
  83.  *
  84.  
  85.  
  86.  
  87. if (!$error && !($size = @getimagesize($_FILES['Filedata']['tmp_name']) ) )
  88. {
  89.     $error = 'Please upload only images, no other files are supported.';
  90. }
  91.  
  92. if (!$error && !in_array($size[2], array(1, 2, 3, 7, 8) ) )
  93. {
  94.     $error = 'Please upload only images of type JPEG, GIF or PNG.';
  95. }
  96.  
  97. if (!$error && ($size[0] < 25) || ($size[1] < 25))
  98. {
  99.     $error = 'Please upload an image bigger than 25px.';
  100. }
  101. */
  102.  
  103.  
  104. // Processing
  105.  
  106. /**
  107.  * Its a demo, you would move or process the file like:
  108.  *
  109.  * move_uploaded_file($_FILES['Filedata']['tmp_name'], '../uploads/' . $_FILES['Filedata']['name']);
  110.  * $return['src'] = '/uploads/' . $_FILES['Filedata']['name'];
  111.  *
  112.  * or
  113.  *
  114.  * $return['link'] = YourImageLibrary::createThumbnail($_FILES['Filedata']['tmp_name']);
  115.  *
  116.  */
  117.  
  118.  move_uploaded_file($_FILES['Filedata']['tmp_name'], '../uploads/' . $_FILES['Filedata']['name']);
  119.  $return['src'] = '/uploads/' . $_FILES['Filedata']['name'];
  120.  or
  121.  $return['link'] = YourImageLibrary::createThumbnail($_FILES['Filedata']['tmp_name']);
  122.  
  123.  
  124. if ($error) {
  125.  
  126.     $return = array(
  127.         'status' => '0',
  128.         'error' => $error
  129.     );
  130.  
  131. } else {
  132.  
  133.     $return = array(
  134.         'status' => '1',
  135.         'name' => $_FILES['Filedata']['name']
  136.     );
  137.  
  138.     // Our processing, we get a hash value from the file
  139.     $return['hash'] = md5_file($_FILES['Filedata']['tmp_name']);
  140.  
  141.     // ... and if available, we get image data
  142.     $info = @getimagesize($_FILES['Filedata']['tmp_name']);
  143.  
  144.     if ($info) {
  145.         $return['width'] = $info[0];
  146.         $return['height'] = $info[1];
  147.         $return['mime'] = $info['mime'];
  148.     }
  149.  
  150. }
  151.  
  152.  
  153. // Output
  154.  
  155. /**
  156.  * Again, a demo case. We can switch here, for different showcases
  157.  * between different formats. You can also return plain data, like an URL
  158.  * or whatever you want.
  159.  *
  160.  * The Content-type headers are uncommented, since Flash doesn't care for them
  161.  * anyway. This way also the IFrame-based uploader sees the content.
  162.  */
  163.  
  164. if (isset($_REQUEST['response']) && $_REQUEST['response'] == 'xml') {
  165.     // header('Content-type: text/xml');
  166.  
  167.     // Really dirty, use DOM and CDATA section!
  168.     echo '<response>';
  169.     foreach ($return as $key => $value) {
  170.         echo "<$key><![CDATA[$value]]></$key>";
  171.     }
  172.     echo '</response>';
  173. } else {
  174.     // header('Content-type: application/json');
  175.  
  176.     echo json_encode($return);
  177. }
  178.  
  179. ?>

Pero no puedo hacerlo funcionar.. alguien me puede ayudar un poco??
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:05.