How to build image upload with draggable reorder, rotation and delete in next.js/react and python backend

This howto covers:
- image upload with
<input type="file" multiple />
component - frontend in next.js (97% is react, so if you’re using react this howto should work for you too)
- backend in python: uploading to s3 (I’m using Flask but 97% is framework agnostic)
- image reordering with dndkit
- image deletion
- image rotation in python using Pillow