Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure import filename length cannot exceed 100 characters #85

Merged
merged 3 commits into from
Nov 18, 2016

Conversation

norkans7
Copy link
Contributor

@norkans7 norkans7 commented Nov 9, 2016

No description provided.

@@ -8,8 +10,16 @@
from smartmin.models import SmartModel


def generate_file_path(instance, filename):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this change? Should we be using a random file name instead to ensure uniqueness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here I want to make sure the length is not exceeding 64 to prevent https://sentry.io/nyaruka/textit/issues/178987795/

yep I was going to investigate how the uniqueness of name is done on django

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rowanseymour I verified this is safe django always makes sure the file names are unique by appending 8 characters to the file name

@@ -1,4 +1,4 @@
celery
celery<4.0.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

celery 4.0.0 requires django 1.8 I pin this way to keep supporting django 1.7

@norkans7 norkans7 changed the title ensure import filename length cannot exceed 64 characters ensure import filename length cannot exceed 100 characters Nov 10, 2016
@nicpottier nicpottier merged commit 0ebe2a2 into master Nov 18, 2016
@nicpottier nicpottier deleted the import-filename-truncate branch November 18, 2016 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants