Changes between Initial Version and Version 1 of Ticket #30695
- Timestamp:
- Aug 10, 2019, 11:50:13 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30695 – Description
initial v1 1 1 This section of the docs (https://docs.djangoproject.com/en/2.2/topics/files/#storage-objects) suggests that one should use absolute paths when calling storage API methods, but executing this sample code on a fresh Django 2.2 project raises a `SuspiciousFileOperation` error: 2 2 3 ``` 3 {{{ 4 4 (filestorage-test) $ pip freeze 5 5 Django==2.2.4 … … 29 29 'component ({})'.format(final_path, base_path)) 30 30 django.core.exceptions.SuspiciousFileOperation: The joined path (/path/to/file) is located outside of the base path component (/Users/tobias/tmp/filestorage_test) 31 ``` 31 }}} 32 32 33 33 I realize one could prepend the path to `MEDIA_ROOT` to work around that, but I'm not sure that's the right convention to establish when relative paths work just as well (not to mention that prepending `MEDIA_ROOT` would be the wrong approach for a remote storage).