Let me try to explain
The Purpose is a “201 Created”" header
That same header should have a URL Like
I can not provide the link to the file (in the header) till it is actually available. This is to conform to the eSCL protocol and keep eSCL clients like MacOS and Mopria Scan for Android happy. Also because the file has not yet been generated nor has the UUID , which is tied to date/time to guarantee uniqueness.
So what needs to happen is the client makes a POST requesting a page be scanned from the document feeder in color at 300 dpi and saved as jpg
I need to NOT provide the header until the link is actually VALID (this is also to be able to create a valid unique link to this file)
So then I create a filename like Scan202107081631.jpg and the scan is posted to UUID like this
I guess the point is NOT that you understand WHY, rather that this is how it MUST GO.