source: branches/2.4/prototype/upload.php @ 5437

Revision 5437, 356 bytes checked in by cristiano, 12 years ago (diff)

Ticket #2434 - Atualização modulo agenda e API

Line 
1<?php
2
3$result = array();
4
5require_once 'api/controller.php';
6$URI = Controller::URI( 'attachment' );
7
8foreach( $_FILES as $name => $file )
9{
10    $file['source'] = file_get_contents( $file['tmp_name'] );
11    unset( $file['tmp_name'] );
12
13    $result[$name] = Controller::create( $URI, $file );
14
15
16    unset( $file['source'] );
17}
18
19echo json_encode( $result );
Note: See TracBrowser for help on using the repository browser.