Revision 5437,
356 bytes
checked in by cristiano, 13 years ago
(diff) |
Ticket #2434 - Atualização modulo agenda e API
|
Rev | Line | |
---|
[5341] | 1 | <?php |
---|
| 2 | |
---|
| 3 | $result = array(); |
---|
| 4 | |
---|
[5399] | 5 | require_once 'api/controller.php'; |
---|
[5341] | 6 | $URI = Controller::URI( 'attachment' ); |
---|
| 7 | |
---|
| 8 | foreach( $_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 | |
---|
| 19 | echo json_encode( $result ); |
---|
Note: See
TracBrowser
for help on using the repository browser.