You can pretty much save temporary files anywhere on disk if you have permissions. You just need to make sure the files are uniquely named for the anonymous user.
Ideally, having a dedicated “temporary” folder is a good idea where these files will be periodically deleted or cleaned up.
source
share