Closed obj63mc closed 5 years ago
Looks like this more an issue with Guzzle PSR7 auto removing resources that were in the temp directory upon upload. Still if you have any other thoughts on why the temp resources is deleted automatically would be great. Can't find anything out there on this.
Currently I have a site that uploads a file stored in the temp directory of the server. This is a path like - "/private/var/tmp/phprROvf6"
Then we open that path, and then try to upload it GC. Example
The issue is whenever it tries to close the $handle variable after uploading it states it is no longer a stream and errors out. I can confirm that the handle is a stream originally, that the file does upload correctly and the result returned says true, but after it gets uploaded - https://github.com/Superbalist/flysystem-google-cloud-storage/blob/master/src/GoogleStorageAdapter.php line 174 (protected function upload($path, $contents, Config $config)
the stream then becomes corrupt.
var_dump($handle) before it tries to upload -
var_dump($handle) after the stream is uploaded -
Any idea why this would happen or how to prevent it.