Package bscw ::
Package api ::
Module ap_adddocument
|
|
Module ap_adddocument
add a doument
returns id of new document
API definition::
API = (('target_id', 'ASCII string', 1),
('data', 'base64', 1),
('name', 'Unicode string', 1),
('description', 'Unicode string', 0),
('type', 'ASCII string', 0),
('encoding', 'ASCII string', 0),
('rating', 'int', 0),
('language', 'ASCII string', 0),
('category', 'ASCII string', 0),
('keywords', 'ASCII string', 0))
(c) Fraunhofer FIT, 2002-2008
|
param_def()
return the parameter definition |
|
|
|
do_it(request,
target_id,
data,
name,
desc='
' ,
typ='
' ,
enc='
' ,
rating=0,
language='
' ,
category='
' ,
keywords='
' )
see above |
|
|
|
add_doc(self,
request,
fname,
fsize,
name,
descr,
typ,
enc,
rating,
op,
language='
' ,
category='
' ,
keywords='
' ,
force_new=False,
changes='
' ,
scanfile=True)
Usually, this function tries to overwrite documents that match in
name, mime type, ...! You can disable this by setting force_new to
True |
|
|
|
target_doc(target,
name,
typ,
enc,
user,
force_new=False) |
|
|
|
scan(request,
fname,
name) |
|
|
|
log_api = logging.getLogger('api')
|
|
_sep_pat = re.compile(r'[ \\/] ')
|
|
__package__ = ' bscw.api '
|