Ticket #33: 6.2.txt

File 6.2.txt, 2.7 KB (added by zooko, at 2007-05-04T22:19:25Z)

the patch from Faried

Line 
1-----BEGIN PGP SIGNED MESSAGE-----
2Hash: SHA1
3
4
5New patches:
6
7[ticket #33: uploading private files.
8Faried Nawaz <self@node.pk>**20070504220829
9 
10 This is the easy part.  It's late and I can't figure out how to display
11 the resulting URI in Nevow.
12] {
13hunk ./src/allmydata/webish.py 170
14+       privateUpload = annotate.Radio(label="Private?", choices=["Yes"])
15+       privatearg = annotate.Argument("privateupload", privateUpload)
16+
17hunk ./src/allmydata/webish.py 174
18- -        meth = annotate.Method(arguments=[contentsarg, ctxarg],
19+        meth = annotate.Method(arguments=[contentsarg, privatearg, ctxarg],
20hunk ./src/allmydata/webish.py 178
21- -    def upload(self, contents, ctx):
22+    def upload(self, contents, privateupload, ctx):
23hunk ./src/allmydata/webish.py 185
24- -        d.addCallback(lambda vid:
25- -                      self._dirnode.callRemote("add_file", name, vid))
26+       if not privateupload:
27+            d.addCallback(lambda vid:
28+                          self._dirnode.callRemote("add_file", name, vid))
29hunk ./src/allmydata/webish.py 189
30- -            log.msg("webish upload complete")
31- -            return res
32+            log.msg("webish upload complete, uri: %s" % res)
33+            #return res
34+            if privateupload:
35+                return url.here.add("results",
36+                                    "upload of '%s' complete!  URI is %s" %
37+                                    (contents.filename, res))
38}
39
40Context:
41
42[add link to ticket #36 -- FUSE integration
43"Zooko O'Whielacronx <zooko@zooko.com>"**20070504170601]
44[test_introducer.py: turn off the defer.setDebugging(True) call that was left over from a troubleshooting session: it slows down the test suite by a factor of 2
45warner@lothar.com**20070504074523]
46[add deb-etch target, rearrange make-version a bit, closes #23
47warner@lothar.com**20070504070706]
48[add link to ticket #34 -- disk space limits in storage servers
49"Zooko O'Whielacronx <zooko@zooko.com>"**20070504055752]
50[makefile: delete .pycs before running tests, since our build process puts the wrong filenames into them
51warner@lothar.com**20070504041215]
52[.darcs-boringfile: ignore some build/ directories for foolscap and zfec
53warner@lothar.com**20070504033151]
54[version.py: handle both '0.2.0' and '0.2.0-1', remove 'tags' for now
55warner@lothar.com**20070504033127]
56[update version-number handling, pull release tags from darcs history
57warner@lothar.com**20070504031407]
58[TAG allmydata-tahoe-0.2.0
59warner@lothar.com**20070504024220]
60Patch bundle hash:
61fd8a427529c09561c038f823ac48ed15b82f3d12
62-----BEGIN PGP SIGNATURE-----
63Version: GnuPG v1.4.6 (GNU/Linux)
64
65iD8DBQFGO692G5ga/wns7AYRAhnTAJ4tubaWUK/Nrd7wUtWr9B+mf14E/QCgzkC9
66Q/BGQ1/vfhQ2O4UxWexdEmM=
67=y/Bw
68-----END PGP SIGNATURE-----