Comments (6)
Hi!
I get the exact same error too:
Warning: fclose(): supplied resource is not a valid stream resource
$logger->info("Uplaoding local file", ['size' => $this->size, 'filename' => $this->filename]);
$fileSize = filesize($this->localfile);
if (!$fileSize)
throw new \DomainException("Couldn't read filesize! " . error_get_last());
$this->size = $fileSize;
$fh = fopen($this->localfile, "rb");
if (!is_resource($fh))
throw new \DomainException("Couldn't open file! " . error_get_last());
$success = $filesystem->writeStream($this->getRealPath(), $fh);
fclose($fh);
from flysystem-google-cloud-storage.
It might be tricky to solve, Guzzle6's Stream wrapper closes the stream on __destruct
,
This creates a few issues when using Flysystems ReplicateAdapter when the Stream is closed prematurely :/
https://github.com/thephpleague/flysystem-replicate-adapter
from flysystem-google-cloud-storage.
doesn't this issue resides with the twistor/flysystem-stream-wrapper
package ?
from flysystem-google-cloud-storage.
Hi!
It's been a while since I looked at it, but I think this is the relevant file https://github.com/guzzle/psr7/blob/master/src/Stream.php#L78:
/**
* Closes the stream when the destructed
*/
public function __destruct()
{
$this->close();
}
from flysystem-google-cloud-storage.
Refs: twistor/flysystem-stream-wrapper#9
from flysystem-google-cloud-storage.
Closed as this issue is not related to this package
from flysystem-google-cloud-storage.
Related Issues (20)
- Renaming and moving Folders does not work HOT 1
- Function getOptionsFromConfig() is not working HOT 1
- undefined method: getUrl(); HOT 1
- get url from firebase storage using php
- has function does not return true for directories HOT 2
- upload fails with uniform access controls HOT 4
- ReadMe Correction for getUrl
- Supporting Flysystem 2.x HOT 4
- Getting 404 when i try to delete directory.
- File stream is dropped on writeStream() HOT 5
- Question: is it possible to set Cache-Control? HOT 1
- Authetification Issue HOT 2
- What's the status of this project? HOT 2
- Dependencies flysystem
- Could you update the library
- How to delete a dir with millions of files?
- PHP Warning thrown after asset Uploaded - stream provided gets corrupted HOT 1
- GoogleStorageAdapter::deleteDir fails to delete a directory HOT 2
- Is there a reason to explicitly set the visibility if not passed? HOT 7
- Changes to google api endpoint HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flysystem-google-cloud-storage.