Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <div class="row">
  2. <div class="col s10">
  3. <div class="bg-branco">
  4. <input name="avariaNome[]" type="text" placeholder="Referencia">
  5. <input name="avariaFoto[]" type="file">
  6. </div>
  7. </div>
  8. </div>
  9.  
  10. if (!empty($_FILES['avariaFoto']['name'])) {
  11. $handle = new upload($_FILES['avariaFoto']);
  12. if ($handle - > uploaded) {
  13. $handle - > file_new_name_body = date('dmYhis');
  14. $handle - > image_resize = true;
  15. $handle - > image_x = 800;
  16. $handle - > image_ratio_y = true;
  17. $handle - > jpeg_quality = 80;
  18. $handle - > image_convert = 'jpg';
  19. $handle - > file_overwrite = false;
  20. $handle - > file_auto_rename = true;
  21. $handle - > mime_check = true;
  22. $handle - > Process('imagens/');
  23. $foto = $handle - > file_dst_name;
  24.  
  25. if ($handle - > processed) {
  26. $handle - > clean();
  27. } else {
  28. echo ' Erro: '.$handle - > error.
  29. '';
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement