-
Notifications
You must be signed in to change notification settings - Fork 2
Interruptible uploads #231
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7a8b5ba
wip: use django-async-upload for media records
paigewilliams 619adf5
use local admin async libraary during development
paigewilliams 9546b76
use AsyncFileCleanupMixin in MediaAdmin form
paigewilliams 630ae96
support async uploads for MediaBulkUploads
paigewilliams 2484eae
fix tests for media bulk upload admin
paigewilliams 56004dc
set ADMIN_SIMULTANEOUS_UPLOADS to 1
paigewilliams d251595
use ADMIN_RESUMABLE_CHUNK_FOLDER setting
paigewilliams 22a25af
clean up comments
paigewilliams a0eed17
remove debug log
paigewilliams 2671ad7
remove OrphanedFileCleanupMiddleware and AsyncFileCleanupMixin
paigewilliams 736938c
refactor MediaBulkUploadForm to use FormResumableMultipleFileField
paigewilliams 0788466
remove unused ThumbnailFileInput and MultipleFileField
paigewilliams 95da7bf
use django_resumable_async_upload package
paigewilliams 295dd49
use python 3.11 in gh action run-tests
paigewilliams be3da99
add migration for async file fields
paigewilliams 7404d03
revert tests to run on python 3.10
paigewilliams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
TEKDB/TEKDB/migrations/0026_alter_media_mediafile_and_more.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Generated by Django 4.2.27 on 2026-01-30 19:11 | ||
|
|
||
| from django.db import migrations, models | ||
| import django_resumable_async_upload.models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('TEKDB', '0025_alter_mediabulkupload_mediabulkname'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='media', | ||
| name='mediafile', | ||
| field=django_resumable_async_upload.models.AsyncFileField(blank=True, db_column='mediafile', max_files=1, max_length=255, null=True, upload_to='', verbose_name='file'), | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='mediabulkupload', | ||
| name='mediabulkname', | ||
| field=models.CharField(blank=True, default='Bulk Upload on 2026-01-30', max_length=255, null=True, verbose_name='name'), | ||
| ), | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description states that
OrphanedFileCleanupMiddlewareis used and that theMediaandMediaBulkUploadadmin forms useAsyncFileCleanupMixin, but I don’t see that middleware added toMIDDLEWAREor the mixin applied to the relevant admin classes; as written, resumable uploads may leave orphaned files that are never cleaned up. Please either wire up the middleware/mixins as described or update the PR description (and any related docs) to match the actual behavior in this change set.