Closed kajem closed 5 years ago
Can you share the whole stack trace and which version of laravel-chunk-upload
you use?
@nerg4l I am using version 1.2 "pion/laravel-chunk-upload": "^1.2". For the last chunk its try to build full file from the chunks and its getting the above error. I am debugging the code getting this error when calling method getAbsolutePath() in 125 line in vendor\pion\laravel-chunk-upload\src\Save\ParallelSave.php.
It seems that your ChunkStorage
contains a driver which missing the path
method. What you can do is fork the project and change the getAbsolutePath
method of ChunkFile
to return $this->storage->disk()->getPathPrefix().$this->path;
.
Currently I'm at work but I will try to have a look at it in the evening.
@nerg4l Yes, it was path method not having issue. I have changed he getAbsolutePath() method of ChunkFile to return storage_path(). '/app/'.$this->path. Now it is fixed.
@nerg4l Yes, I was path method not having issue. I have changed he getAbsolutePath() method of ChunkFile to return storage_path(). '/app/'.$this->path. Now it is fixed.
Hi guys, I was struggling with this a couple of days too and Indeed that was the issue. However, I've just updated my package thinking that it would have your fix included, but looks like it hasn't been committed yet?
ps: your fix gives my the following error:
Call to undefined method League\Flysystem\Filesystem::getPathPrefix
I've fixed it by replacing the line with the following:
public function getAbsolutePath()
{
// Original code:
// return $this->storage->disk()->path($this->path);
// Your fix:
// return $this->storage->disk()->getPathPrefix().$this->path;
// What worked for me:
return $this->storage->disk()->getDriver()->getAdapter()->getPathPrefix().$this->path;
}
I am getting the below error for last chunk when calling below line.
$receiver->receive()
I have lost last two days with this error. Can anyone please help me to get rid of this errorBadMethodCallException in PluggableTrait.php line 90: Call to undefined method League\Flysystem\Filesystem::path