How to access uploaded file from server code?

Looks like you’ll need to go by way of a media object, then. You can create a URLMedia object from the URL, and from there either get the bytes or create a temporary file. Both are covered in the docs section on media objects: Anvil Docs | Files, Media Objects and Binary Data

There’s also a blog post in the forum about using Pillow and Anvil. Looking at how that project did it might help with what you’re trying to do. Just do a forum search on pillow and look for the cross-stitch blog post.

Edit: you might also find the new Data Files service helpful. Anvil Docs | Data Files