MEDIA_ROOT is the media root defined in the settings file (default should be media/ in the main root)
APP_ID is the app's id
NUMBER is the screenshot position
EXT is the extension. Use https://docs.python.org/3.5/library/mimetypes.html to parse it and validate it against a configurable setting in base.py, default: ALLOWED_IMAGE_MIMES = ('jpg', 'png', 'gif')
Example: media/news/screenshots/1.jpg
Previously stored images should be removed upon successful import
The image URLs should then be changed to relative path from the MEDIA_ROOT, e.g. news/screenshots/1.jpg. Finally serializers and the web interface need to be adjusted
Deleting apps ofc also gets rid of the screenshots
Not sure why this is still open as images seem to be cached meanwhile (see #925).
Current solution seems to be a redirection (dynamic loading through the app store).
When importing screenshots at https://github.com/nextcloud/appstore/blob/master/nextcloudappstore/core/api/v1/release/importer.py#L134 the real screenshots should be downloaded into the media folder at MEDIA_ROOT/APP_ID/screenshots/NUMBER.EXT where
Example: media/news/screenshots/1.jpg
Previously stored images should be removed upon successful import
In addition the maximum screenshot size should be limited to a configurable setting in base.py, default: MAX_DOWNLOAD_IMG_SIZE = (1024*2) 2 # 2 MB To achieve that refactor https://github.com/nextcloud/appstore/blob/master/nextcloudappstore/core/api/v1/release/downloader.py#L28 so that a downloader can download any file
The image URLs should then be changed to relative path from the MEDIA_ROOT, e.g. news/screenshots/1.jpg. Finally serializers and the web interface need to be adjusted
Deleting apps ofc also gets rid of the screenshots