-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Map screenshots / images #29
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
Conversation
- rename an endpoint - fix the model for screenshot uploads. TODO: - [] map serializer return link for most recent image and all images - [] map serializer return mapfile links
- Add map images to the map serializer. - Test map images return
- Add user_id to file upload model - Some documentation - Stole the file extension getter from the map upload - Add todos for tomorrow. Going to need `BannableObject` sooner rather than later due to circular imports.
- use user id in `CanEdit` to save a query - Add the map image upload endpoint
- fixed issues found via tests - disallow uploads for banned maps, temporary maps, and legacy maps
- Test file size checks
- modify uploaded files to convert to jpeg, slightly shrink, and remove exif - add the cnc_user_id to uploaded files
- make moderabile object - Fix circular imports with file extensions - Fix broken 0002 migration due to the object manager not using the correct schema state
- fix nginx mimetypes for local dev
- move image uploading to its own file
- Add `/maps/img/id` edit endpoint - Add `editable_fields` to serializers, which allows for fields to be set during creation, but never allowed to be updated.
|
|
||
| # Configurable user setup | ||
| ENV USER=cncnet | ||
| ENV UID=1000 |
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.
This was causing issues on machines where the user ID of the host didn't match
| alias /usr/share/nginx/html/static/; # The nginx container's mounted volume. | ||
| expires 30d; | ||
| add_header Cache-Control public; | ||
| include /etc/nginx/mime.types; |
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.
needed to serve files
| from kirovy.models import CncUser | ||
|
|
||
|
|
||
| class Moderabile(models.Model): |
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.
Yes this is a word
TODO:
map.is_publishedBannableabstract model.Remove the extra hash fields from the file base objectmoved to kanbanmoved to kanbanescapeall text fieldsAfter merging