[infrae.fileupload][Sylvain Viollon] Tag 1.0.

[email protected] Tue, 08 Oct 2013 15:54:31 +0200
Newsgroups gmane.comp.web.zope.silva.cvs
Message-ID <[email protected]>
author:    Sylvain Viollon
date:      Tue Oct 08 15:53:40 2013 +0200
revision:  24:17baaeb61348 in infrae.fileupload
branch:    
details:   https://hg.infrae.com/infrae.fileupload?cmd=changeset;node=17baaeb61348
modified:  MANIFEST.in README.txt docs/HISTORY.txt setup.py
added:     MANIFEST.in
removed:   
log:       Tag 1.0.

Subject: [infrae.fileupload][Sylvain Viollon] Added tag 1.0 for changeset 17baaeb61348


author:    Sylvain Viollon
date:      Tue Oct 08 15:53:59 2013 +0200
revision:  25:2c8f3a1a2680 in infrae.fileupload
branch:    
details:   https://hg.infrae.com/infrae.fileupload?cmd=changeset;node=2c8f3a1a2680
modified:  .hgtags
added:     .hgtags
removed:   
log:       Added tag 1.0 for changeset 17baaeb61348

Subject: [infrae.fileupload][Sylvain Viollon] Bump version.


author:    Sylvain Viollon
date:      Tue Oct 08 15:54:29 2013 +0200
revision:  26:331c8cb37d5f in infrae.fileupload
branch:    
details:   https://hg.infrae.com/infrae.fileupload?cmd=changeset;node=331c8cb37d5f
modified:  docs/HISTORY.txt setup.py
added:     
removed:   
log:       Bump version.


diffstat:

 .hgtags          |   1 +
 MANIFEST.in      |   3 ++
 README.txt       |  69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 docs/HISTORY.txt |   7 ++++-
 setup.py         |   2 +-
 5 files changed, 80 insertions(+), 2 deletions(-)

diffs (117 lines):

diff -r afc9b945459c -r 331c8cb37d5f .hgtags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Tue Oct 08 15:54:29 2013 +0200
@@ -0,0 +1,1 @@
+17baaeb61348d4bb27fec90d0b4b6c9a7050e4f9 1.0
diff -r afc9b945459c -r 331c8cb37d5f MANIFEST.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MANIFEST.in	Tue Oct 08 15:54:29 2013 +0200
@@ -0,0 +1,3 @@
+recursive-include src *.py
+recursive-include docs *.txt
+include README.txt
diff -r afc9b945459c -r 331c8cb37d5f README.txt
--- a/README.txt	Wed Sep 25 12:08:18 2013 +0200
+++ b/README.txt	Tue Oct 08 15:54:29 2013 +0200
@@ -2,3 +2,72 @@
 infrae.fileupload
 =================
 
+``infrae.fileupload`` is a WSGI component that can be used as a
+middleware in order to intercept single file upload and save them on
+the disk. The request to the application is then replaced by a json
+body describing the information about the file. The original filename
+and mimetype sent by the browser are kept as metadata. In addition to
+this, it is possible to query the status of the upload and reset it
+with HTTP request (by appending ``/status`` to the upload URL). An API is
+exposed via the ``environ`` dictionnary provided the WSGI application
+and can be used in order to query the files.
+
+The API provides the following methods:
+
+``create_identifier()``
+    Create a new upload identifier that be provided while submitting
+    the form using the ``X-Progress-ID`` parameter in the URL.
+
+``verify_identifier(identifier)``
+    Validate a given identifier.
+
+``access_upload_bucket(identifier)``
+    Access the given upload. An object with the following methods is
+    returned:
+
+    ``get_status()``
+        Return a dictionnary containing metadata information about the upload.
+
+    ``get_filename()``
+        Return the filename of the uploaded file.
+
+    ``is_complete()``
+        Return True if the upload was complete.
+
+    ``clear_upload()``
+        Delete the upload.
+
+``clear_upload_bucket(identifier)``
+    Delete the given upload.
+
+It is possible to use the component as a standalone WSGI application
+and having a dedicated upload server available at a different URL.
+
+Paster
+======
+
+The upload middleware (and upload application) can be used via Paster
+using ``egg:infrae.fileupload``. Configuration directives are:
+
+``directory``
+    Pool directory where to store the uploaded files. If multiple
+    processes accross multiple servers are configured for the same URL, they
+    should share this directory too.
+
+``max_size``
+    Maximum allowed size for an upload in megabytes.
+
+``upload_url``
+    URL where to upload the files. If not specified the URL specified
+    by the wsgi environment will be used. If it is specified, the
+    middleware won't intercept uploads and assume this task is handled
+    by the given URL. This is use in large installation in order to
+    have a dedicated upload server by using the standalone application
+    instead of the middleware. Upload URLs always ends with
+    ``/upload``. If it is not the case it will appended to it.
+
+``upload_key``
+    Private key used to hash upload identifier. This enable a basic
+    security preventing abuse of the upload middleware or
+    application. If multiple processes and installations shares the
+    same upload URL they should share the same upload key too.
diff -r afc9b945459c -r 331c8cb37d5f docs/HISTORY.txt
--- a/docs/HISTORY.txt	Wed Sep 25 12:08:18 2013 +0200
+++ b/docs/HISTORY.txt	Tue Oct 08 15:54:29 2013 +0200
@@ -1,7 +1,12 @@
 Changes
 =======
 
-1.0 (unreleased)
+1.1 (unreleased)
 ----------------
 
 - ...
+
+1.0 (2013/10/08)
+----------------
+
+- Initial release.
diff -r afc9b945459c -r 331c8cb37d5f setup.py
--- a/setup.py	Wed Sep 25 12:08:18 2013 +0200
+++ b/setup.py	Tue Oct 08 15:54:29 2013 +0200
@@ -5,7 +5,7 @@
 from setuptools import setup, find_packages
 import os
 
-version = '1.0dev'
+version = '1.1dev'
 
 tests_require = [
     'infrae.wsgi [test]',