--- fpaste.orig 2013-02-28 18:39:13.000000000 +0100
+++ fpaste 2013-02-28 18:35:20.000000000 +0100
@@ -81,7 +81,7 @@
if len(author) > 30:
author = author[0:30-3] + "..."
- params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'api_submit': 'true', 'mode': 'json'})
+ params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'paste_private':'yes', 'paste_expire': options.expires, 'api_submit': 'true', 'mode': 'json'})
pasteSizeKiB = len(params)/1024.0
if pasteSizeKiB >= 512: # 512KiB appears to be the current hard limit (20110404); old limit was 16MiB
@@ -116,8 +116,8 @@
id = [i[1]["id"] for i in response.iteritems()].pop()
# for k,j in i.iteritems():
# print j, k
-
- url = "{0}{1}".format(FPASTE_URL, id)
+ private_hash = [i[1]["hash"] for i in response.iteritems()].pop()
+ url = "{0}{1}/{2}".format(FPASTE_URL, id, private_hash)
return url
# url = f.geturl()