1WebCommon.setKayaUploadDir(3kaKyaay)a module referWeenbcCeommon.setKayaUploadDir(3kaya)
2
3
4

NAME

6       WebCommon::setKayaUploadDir  -  Set a temporary directory for Kaya file
7       uploads.
8

SYNOPSIS

10       Void setKayaUploadDir( String newdir )
11

ARGUMENTS

13       newdir The temporary directory.
14

DESCRIPTION

16       User file uploads are placed in  a  temporary  directory.  The  default
17       directory is the current directory for the CGI program or webapp, which
18       is strongly discouraged for production use. There are two ways  to  set
19       the new temporary directory, which should ideally be an otherwise empty
20       directory outside the public website, only readable  and  writeable  by
21       the user the program runs as.
22
23       Firstly,  calling this function from within the CGI or webapp's webcon‐
24       fig function will set the directory. (Calls  from  any  other  location
25       have  no  effect, because the uploaded files have already been saved to
26       the temporary location by then!)
27
28       Secondly, if this function has not been used, the  HTTP_KAYA_UPLOAD_DIR
29       environment  variable (consult your webserver documentation for setting
30       environment variables), will be read and used. This feature should  not
31       be  used  by  application  developers, who should use this function and
32       provide an installer-configurable way to set  the  directory  -  it  is
33       intended  to  provide  a  means for Kaya application users to deal with
34       applications which do not use this function.
35
36
37    webapp example;
38
39    import Webapp;
40    import HTMLDocument;
41
42    Void webconfig() {
43        allowFileUploads();
44        setKayaUploadDir("/users/kaya/tmp");
45    }
46
47    HTMLDocument webmain() {
48        // program goes here!
49    }
50
51       Note that Kaya (from 0.2.4 onwards) will not accept file uploads at all
52       unless WebCommon.allowFileUploads (3kaya) is called first, so you don't
53       need to use this function in applications  that  do  not  require  file
54       uploads unless your Kaya version is 0.2.2 or 0.2.3
55

AUTHORS

57       Kaya   standard  library  by  Edwin  Brady,  Chris  Morris  and  others
58       (kaya@kayalang.org). For further information see http://kayalang.org/
59

LICENSE

61       The Kaya standard library is free software;  you  can  redistribute  it
62       and/or  modify  it  under  the  terms  of the GNU Lesser General Public
63       License (version 2.1 or any later version) as  published  by  the  Free
64       Software Foundation.
65
67       WebCommon.allowFileUploads (3kaya)
68       WebCommon.setKayaMaxPost (3kaya)
69
70
71
72Kaya                             December 2010WebCommon.setKayaUploadDir(3kaya)
Impressum