version 1.29, 2004/04/18 19:42:12
|
version 1.31, 2004/06/23 05:36:08
|
Line 144 def add4(self):
|
Line 144 def add4(self):
|
self.REQUEST.SESSION['folder_name']=self.folder_name |
self.REQUEST.SESSION['folder_name']=self.folder_name |
if self.REQUEST['submit']=="upload images": |
if self.REQUEST['submit']=="upload images": |
self.REQUEST.SESSION['path']=os.path.join(self.REQUEST.SESSION['path'],self.REQUEST['folder_name']) |
self.REQUEST.SESSION['path']=os.path.join(self.REQUEST.SESSION['path'],self.REQUEST['folder_name']) |
|
|
|
|
|
try: |
|
os.mkdir(self.REQUEST.SESSION['path']) |
|
os.chmod(self.REQUEST.SESSION['path'],0774) |
|
except: |
|
"""nothing""" |
|
|
self.image_folder_name="pageimg" |
self.image_folder_name="pageimg" |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload').__of__(self) |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload').__of__(self) |
return newtemplate() |
return newtemplate() |
Line 192 def add6(self):
|
Line 200 def add6(self):
|
else: |
else: |
#print self.add_metadata['archive-path'] |
#print self.add_metadata['archive-path'] |
self.viewpath=re.search(r"/mpiwg/online/(.*)",self.add_metadata['archive-path']).group(1) |
self.viewpath=re.search(r"/mpiwg/online/(.*)",self.add_metadata['archive-path']).group(1) |
if not (self.REQUEST.SESSION['no_upload']=="text"): |
|
|
if (self.REQUEST.SESSION.has_key('no_upload')) and (self.REQUEST.SESSION['no_upload']=="text"): |
|
"""text upload""" |
|
return 1 |
|
else: |
newtemplate2=PageTemplateFile('Products/OSA_system/zpt/OSAS_saved').__of__(self) |
newtemplate2=PageTemplateFile('Products/OSA_system/zpt/OSAS_saved').__of__(self) |
newtemplate2.content_type="text/html" |
newtemplate2.content_type="text/html" |
self.REQUEST.response.setHeader('Content-Type','text/html') |
self.REQUEST.response.setHeader('Content-Type','text/html') |
return newtemplate2() |
return newtemplate2() |
else: |
|
"""text upload""" |
|
return 1 |
|
|
|
|
|
|
|
Line 579 def combineTextImage2(self,path):
|
Line 588 def combineTextImage2(self,path):
|
xsltnode.appendChild(xsltnodetext) |
xsltnode.appendChild(xsltnodetext) |
subnode.appendChild(xsltnode) |
subnode.appendChild(xsltnode) |
|
|
|
if self.REQUEST.has_key('digiliburlprefix'): |
|
if not self.REQUEST['digiliburlprefix']=="": |
|
xsltnode=dom.createElement('digiliburlprefix') |
|
xsltnodetext=dom.createTextNode(self.REQUEST['digiliburlprefix']) |
|
xsltnode.appendChild(xsltnodetext) |
|
subnode.appendChild(xsltnode) |
|
|
node.appendChild(subnode) |
node.appendChild(subnode) |
|
|
try: |
try: |