Squashed commit of the following:
commit d0e3e13bab
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 08:07:57 2022 +0300
README: add new endpoints to the working
commit 0f3deb34d1
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 08:05:36 2022 +0300
Media: add handling of skin from URL upload
Additions:
- /minecraft/profile/skins skin from URL upload
Fixes:
- /minecraft/profile/skins use lowercase for "skin" in temp folder
commit b9c82efb3b
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 07:58:01 2022 +0300
Requirements: add new dependency (requests)
commit c8d3fbedd3
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 07:55:28 2022 +0300
Media: upload skin endpoint
Fixes:
- upload_file() get UUID from player username
Additions:
- is_file_allowed() returns if an uploaded file is allowed on the
server
- check_temp_folder() creates all the temp dirs
- /minecraft/profile/skins skin upload endpoint
commit f184b9d61c
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 07:38:08 2022 +0300
Media: add delete skin method & endpoint
Additions:
- delete_file() method to delete files from storage pool
- remove_skin_from_player() method to delete reset player skin
- /minecraft/profile/skins/active endpoint to reset player skin
commit d446632c81
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 07:28:01 2022 +0300
MediaAPI: add cape profile endpoint
Additions:
- /minecraft/profile/capes/active endpoint
commit 6149513f50
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 01:43:20 2022 +0300
Media: cache values for hashes
commit b680adb58b
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 01:40:04 2022 +0300
Media: add cape handling
Additions:
- get_player_cape() method to retreive cape hash
- generate_user_profile() now uses the selected user cape
Fixes:
- upload_file() now uses the cape or skin path depending on type
commit 978a477c14
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 01:32:08 2022 +0300
API: add mediaapi & related methods
Additions:
- Base media API file
- get_player_skin() method that returns the file hash
- generate_user_profile() now uses the real player skin
commit 8367b86be3
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 01:17:31 2022 +0300
Mediautil: add method & remove temp file
Additions:
- download_file() method that downloads to tmp location
Fixes:
- Remove temp file on upload_file() call
commit 0bcbe7cc94
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 01:11:29 2022 +0300
Utils: add basic mediautil file
Additions:
- get_hash() -> Generates sha-1 hash from file
- upload_file() -> Uploads the file to the s3 bucket with {hash}.png
commit 49e82db8dc
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 00:59:48 2022 +0300
Requirements: add storage API requirement (boto3)
commit 35411a63c5
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 00:54:34 2022 +0300
DB: add media class to ORM file
commit efa69b8154
Author: Jae Lo Presti (DN0) <me@jae.fi>
Date: Fri Aug 19 00:53:00 2022 +0300
Migrations: add new migations for the media table