Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Django Private Storage
Commits
bab6d253
Unverified
Commit
bab6d253
authored
May 08, 2018
by
Diederik van der Boor
Browse files
Bump to v2.1
parent
713f9188
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES.rst
View file @
bab6d253
Changelog
=========
Changes in 2.1 (2018-05-08)
---------------------------
* Added ``serve_file_not_found()`` to allow custom 404 serving in ``PrivateStorageView`` and ``PrivateStorageDetailView``.
* Added ``Cache-Control`` headers to avoid caching private files in edge proxies.
* Fixed ``PrivateStorageDetailView`` to use using the custom storage class defined in the model's ``PrivateFileField``.
* Fixed ``Content-Disposition`` filename encoding in Python 3.
* Fixed ``Content-Disposition`` filename support for old Internet Explorer browsers.
Changes in 2.0 (2018-02-06)
---------------------------
...
...
README.rst
View file @
bab6d253
...
...
@@ -159,6 +159,15 @@ create a custom view that provides the download.
#
This
overrides
PRIVATE_STORAGE_AUTH_FUNCTION
return
True
The
following
class
-
level
attributes
can
be
overwritten
:
*
``
model
``:
The
model
to
fetch
(
including
every
other
attribute
of
``
SingleObjectMixin
``).
*
``
model_file_field
``:
This
should
point
to
the
field
used
to
store
the
file
.
*
``
storage
``
/
``
get_storage
()``:
The
storage
class
to
read
the
file
from
.
*
``
server_class
``:
The
Python
class
used
to
generate
the
``
HttpResponse
``
/
``
FileResponse
``.
*
``
content_disposition
``:
Can
be
"inline"
(
show
inside
the
browser
)
or
"attachment"
(
saved
as
download
).
*
``
content_disposition_filename
``
/
``
get_content_disposition_filename
()``:
Overrides
the
filename
for
downloading
.
Optimizing
large
file
transfers
-------------------------------
...
...
private_storage/__init__.py
View file @
bab6d253
# following PEP 440
__version__
=
"2.
0
"
__version__
=
"2.
1
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment