Check filehash and filename, not just hash when checking if it needs to be saved. (#32)
This commit is contained in:
parent
6df5f1c674
commit
ff3c2f327a
@ -54,6 +54,7 @@ I will sign everything with 0x769A1BC78A2DDEE2
|
|||||||
|
|
||||||
## CHANGELOG
|
## CHANGELOG
|
||||||
|
|
||||||
|
- 2017-01-26 [Tyrel Souza] Check filehash and filename, not just hash when checking if it needs to be saved.
|
||||||
- 2017-01-25 [Tyrel Souza] Keeping Filename on upload.
|
- 2017-01-25 [Tyrel Souza] Keeping Filename on upload.
|
||||||
- 2017-01-23 [Tyrel Souza] Add Modified Time to storage support
|
- 2017-01-23 [Tyrel Souza] Add Modified Time to storage support
|
||||||
- 2017-01-23 [Tyrel Souza] Everything should return a "filename" even if it's generated. Make the filename be the hash + ext. (fall back to .txt)
|
- 2017-01-23 [Tyrel Souza] Everything should return a "filename" even if it's generated. Make the filename be the hash + ext. (fall back to .txt)
|
||||||
|
@ -63,7 +63,7 @@ class DBFileStorage(Storage):
|
|||||||
file_ext = ".txt"
|
file_ext = ".txt"
|
||||||
|
|
||||||
# create the file, or just return name if the exact file already exists
|
# create the file, or just return name if the exact file already exists
|
||||||
if not DBFile.objects.filter(pk=filehash).exists():
|
if not DBFile.objects.filter(filehash=filehash, name=name).exists():
|
||||||
the_file = DBFile(
|
the_file = DBFile(
|
||||||
name=name,
|
name=name,
|
||||||
filehash=filehash,
|
filehash=filehash,
|
||||||
|
@ -54,9 +54,9 @@ author = u'Tyrel Souza'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = u'0.5.1'
|
version = u'0.5.2'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = u'0.5.1'
|
release = u'0.5.2'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
2
setup.py
2
setup.py
@ -24,7 +24,7 @@ class CleanCommand(Command):
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="django-dbfilestorage",
|
name="django-dbfilestorage",
|
||||||
version="0.5.1",
|
version="0.5.2",
|
||||||
description="Database backed file storage for testing.",
|
description="Database backed file storage for testing.",
|
||||||
long_description="Database backed file storage for testing. Stores files as base64 encoded textfields.",
|
long_description="Database backed file storage for testing. Stores files as base64 encoded textfields.",
|
||||||
author="Tyrel Souza",
|
author="Tyrel Souza",
|
||||||
|
Loading…
Reference in New Issue
Block a user