Album art not displaying following update to attachments table Amazon S3
Steps to reproduce
- Upgrade a pod using Amazon S3 as its storage backend to develop image at commit 7c6855d9
- Navigate to site in browser
What happens?
Album art images are not displayed
What is expected?
Album art should be displayed as normal
Context
Funkwhale version(s) affected: develop: git+7c6855d9
- Browsers tested: Chrome, Firefox
- Instance configuration: Docker multi-container, nginx, Amazon S3 backend
- Error messages: during migration
NotImplementedError: This backend doesn't support absolute paths.
is encountered (full output below) - Audio streaming is not impacted
Applying music.0043_album_cover_attachment...Traceback (most recent call last):
File "manage.py", line 27, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/usr/lib/python3.6/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 234, in handle
fake_initial=fake_initial,
File "/usr/lib/python3.6/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/lib/python3.6/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/lib/python3.6/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/lib/python3.6/site-packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/lib/python3.6/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File "/app/funkwhale_api/music/migrations/0043_album_cover_attachment.py", line 21, in create_attachments
mimetype=get_mimetype(album.cover.path),
File "/usr/lib/python3.6/site-packages/django/db/models/fields/files.py", line 57, in path
return self.storage.path(self.name)
File "/usr/lib/python3.6/site-packages/django/core/files/storage.py", line 109, in path
raise NotImplementedError("This backend doesn't support absolute paths.")
NotImplementedError: This backend doesn't support absolute paths.