source: branches/2.2/filemanager/inc/uploadApp.php @ 3889

Revision 3889, 1.4 KB checked in by alexandrecorreia, 13 years ago (diff)

Ticket #1660 - Enviar arquivos pelo filemanager, tratado o erro para o php.

Line 
1<?php
2
3session_id( $_GET['id'] );
4session_start();
5setcookie( 'jupload', $_GET['id'], time()+3600 );
6
7include 'jupload.php';
8
9function handle_uploaded_files($juploadPhpSupportClass, $files)
10{
11        return
12                "<P>We are in the 'handle_uploaded_files' callback function, in the index.php script. To avoid double coding, we "
13                . "just call the default behavior of the JUpload PHP class. Just replace this by your code...</P>"
14                . $juploadPhpSupportClass->defaultAfterUploadManagement();
15        ;
16
17}
18
19// Set Max File Size
20$maxFileSize = "10M";
21
22if ( file_exists('setFileMaxSize.php') )
23{
24        require_once('setFileMaxSize.php');
25        $maxFileSize  = unserialize(base64_decode($SET_FILE_MAX_SIZE));
26        $maxFileSize  = trim($maxFileSize)."M";
27}
28
29$appletParameters = array(
30                                                        'maxFileSize' => $maxFileSize,
31                                                        'maxChunkSize' => '1600000',
32                                                        'archive' => '../tp/juploader/wjhk.jupload.jar',
33                                                        'afterUploadURL' => 'after_upload.php',
34                                                        'sendMD5Sum' => 'true',
35                                                        'showLogWindow' => 'false',
36                                                        'debugLevel' => 0
37                                                );
38
39$classParameters = array(
40                                                        'demo_mode' => false,
41                                                        'allow_subdirs' => true,
42                                                        'destdir' => '/tmp'  //Where to store the files on the webserver
43                                                );
44
45$juploadPhpSupportClass = new JUpload($appletParameters, $classParameters);
46
47echo '<div align="left"><!--JUPLOAD_FILES--></div>';
48echo '<div align="left"><!--JUPLOAD_APPLET--></div>';
49
50?>
Note: See TracBrowser for help on using the repository browser.