Attachment 'patchpullfromdir.diff'
Download 1 --- /sjr/beodata/tmp/software/Gallery2-1.3.5-6.py 2005-08-10 12:30:55.000000000 -0400
2 +++ Gallery2.py 2005-08-10 12:27:32.000000000 -0400
3 @@ -329,6 +338,7 @@
4 self.kw['thumbnail_width']='128'
5 self.kw['webnail_width']='640'
6 self.kw['text_width']='140'
7 + self.kw['pull_from_dir']=None
8
9
10
11 @@ -349,7 +359,12 @@
12
13 current_pagename=formatter.page.page_name
14
15 - attachment_path = AttachFile.getAttachDir(self.request,current_pagename,create=1)
16 + if kw['pull_from_dir']:
17 + attachment_path = kw['pull_from_dir']
18 + else:
19 + attachment_path = AttachFile.getAttachDir(self.request,current_pagename,create=1)
20 +
21 + out_path = AttachFile.getAttachDir(self.request,current_pagename,create=1)
22
23 if (kw['help'] == '1'):
24
25 @@ -505,8 +520,8 @@
26 'date' : 'alias'
27 })
28
29 - thumb=os.path.join(attachment_path,thumbfile)
30 - webf=os.path.join(attachment_path,webnail)
31 + thumb=os.path.join(out_path,thumbfile)
32 + webf=os.path.join(out_path,webnail)
33
34 if (kw['renew'] == '1'):
35 if os.path.exists(thumb):
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.