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

Trim upload path to 116 characters #117

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Trim upload path to 116 characters #117

merged 2 commits into from
Dec 13, 2024

Conversation

Abdullah13521
Copy link
Contributor

@Abdullah13521 Abdullah13521 commented Dec 13, 2024

Description

Addresses this issue

Type of change

  • 🚨 Breaking change - causes existing functionality to break (triggers MAJOR version bump)
  • ✨ New feature - adds functionality in a non-breaking way (triggers MINOR version bump)
  • 🐛 Bug fix - fixes an issue without changing functionality (triggers PATCH version bump)
  • 🏠 Internal - changes that don't affect external functionality (no version bump)
    (e.g., refactoring, docs, tests, admin site changes)

Release Impact

  • Current version:
  • Next version will be:

Checklist

  • My code follows the style guidelines
  • My code is tested with 99%+ coverage
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have updated the documentation to reflect my changes
  • I have added/updated tests to cover my changes

Breaking Changes

Migration Guide

Additional Notes

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
web/api/models.py 100.00% <100.00%> (ø)
web/api/tests/tests.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

else:
upload_path = f"documents/{safe_email}/{filename}"

MAX_UPLOAD_PATH_LENGTH = 116
Copy link
Contributor Author

@Abdullah13521 Abdullah13521 Dec 13, 2024

Choose a reason for hiding this comment

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

I did a few trials and found that 116 is the maximum allowed length by s3 so I remove the additional characters while making sure the extension is still accounted for.

@Jonathan-Adly Jonathan-Adly added the patch PATCH (x.x.X): Bug fixes and minor changes label Dec 13, 2024
@Jonathan-Adly Jonathan-Adly merged commit 50b69f9 into main Dec 13, 2024
2 checks passed
@Jonathan-Adly Jonathan-Adly deleted the trim-name branch January 7, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch PATCH (x.x.X): Bug fixes and minor changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants