I have not completely deciphered the Upload classes, so I apologize if I misunderstand.
For the extension development I'm doing, I'm working with a specialized subclass of SpecialUpload that sometimes interrupts the final stage of uploading, and does other work with the file contents rather than publishing it to a File: page.
When the file is uploaded directly, it seems I can find it using $this->mUpload->getTempPath() and operate on the file contents, but if the file has been stashed and mUpload is now an UploadFromStash object, that doesn't work.
The only way I can see to get the stashed file's path is to ignore mUpload, go back to the session key from the request data, and use UploadStash::getMetadata() to find out where the file is. This requires me to violate UploadBase's polymorphism and handle the separate cases in my calling code.
Another option would be to call $this->mUpload->stashSession(), but if I'm not mistaken that would actually copy the file to a second stashed location, which is wasteful.
It would be helpful to have getTempPath() or a similar method give me the path of the stashed file, so that my code would not have to know whether $this->mUpload is stashed or not.
Version: 1.23.0
Severity: normal