first working version of s3 refactor.
This commit is contained in:
parent
705ec314a3
commit
1df454a632
6 changed files with 86 additions and 35 deletions
|
|
@ -2,10 +2,23 @@ from __future__ import unicode_literals
|
|||
from .responses import S3ResponseInstance
|
||||
|
||||
url_bases = [
|
||||
"https?://s3(.*).amazonaws.com",
|
||||
"https?://(?P<bucket_name>[a-zA-Z0-9\-_.]*)\.?s3(.*).amazonaws.com"
|
||||
]
|
||||
|
||||
url_paths = {
|
||||
# subdomain bucket
|
||||
'{0}/$': S3ResponseInstance.bucket_response,
|
||||
'{0}/(?P<key_name>.+)': S3ResponseInstance.key_response,
|
||||
|
||||
# subdomain key of path-based bucket
|
||||
'{0}/(?P<key_name>.+)': S3ResponseInstance.response,
|
||||
|
||||
|
||||
# path-based bucket + key
|
||||
'{0}/(?P<bucket_name_path>[a-zA-Z0-9\-_./]+)/(?P<key_name>.+)': S3ResponseInstance.key_response,
|
||||
|
||||
|
||||
|
||||
# '{0}/(?P<bucket_name>[a-zA-Z0-9\-_.]+)$': ro.bucket_response,
|
||||
# '{0}/(?P<bucket_name>[a-zA-Z0-9\-_.]+)/$': bucket_response2,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue