flysystem is a PHP library that provides an abstraction layer for filesystems. It provides a common API for handling standard tasks across multiple file storage engines, and enables easily swapping local and remote filesystems and emulating directories in systems that don't support them.
Questions tagged [flysystem]
134 questions
0
votes
1 answer
How to fix "Uncaught Error: Call to a member function insertOne() on null" in php
I followed the solution introduced here https://stackoverflow.com/a/36041188/11295637 to create a new csv file and fetch specific columns of a large csv file to the new one.
But, I get this error: Uncaught Error: Call to a member function…

Jazal
- 21
- 1
- 5
0
votes
2 answers
Error while creating ZIP file in Symfony4 with Flysystem and ZipAdapter
Introduction
In my personal project i am using:
Symfony v4.2.3;
PHP v7.2.14
OnUp Flysystem bundle;
Flysystem ZipArchive.
on Windows 10 Pro (php built-in dev server);
File operations with Flysystem works fine both in project_dir/public folder and…

Rikijs
- 728
- 1
- 12
- 48
0
votes
0 answers
Connection closed prematurely
I have an application which gets the data from CSV as a collection and send to a SFTP path. I am using this flysystem-sftp and everything was working fine and suddenly started to get 'Connection closed prematurely' error for my job which send the…

MOHAMMED ABDUL HASEEB
- 241
- 1
- 2
- 5
0
votes
0 answers
Connecting from webserver to SFTP server / firewall issues
I am trying to connect to a remote SFTP server via Phpleagues Flysystem.
The remote SFTP server's firewall only allows the IP address of our webserver.
In my understanding, when a client accesses our website an API request from the client is sent…

santacruz
- 1,236
- 2
- 12
- 24
0
votes
1 answer
Force the download of a file read by Flysystem from AWS S3
Good morning, everyone,
My question is simple, I use Flysystem (on Symfony) to recover a resource from S3 (through DigitalOcean). I would like to be able to return it for download to the user. Here is my code:
$client = new S3Client([
…

user5551022
- 55
- 10
0
votes
1 answer
Lumen Storage - FileNotFoundException
I added flysystem to Lumen so I can use the Storage Facade.
I added the correct config file and then I'm trying:
$template = Storage::get(storage_path('a.html'));
Config:
'disks' => [
'local' => [
'driver' => 'local',
'root' =>…

Tudor-Radu Barbu
- 444
- 1
- 11
- 28
0
votes
1 answer
PHP flatten a directory
I'm using flysystem to work with my files.
I don't see an easy way to flatten a directory so I used this
public function flattenDir($dir, $destination = null) {
$files = find($dir . '/*');
foreach ($files as $file) {
$localdir =…

Atnaize
- 1,766
- 5
- 25
- 54
0
votes
0 answers
Flysystem: Optimize stream
I'm using the Flysystem mount manager to create a sync strategie.
My code is based on the example on the website. But I've made a little change, I use
$manager->put(
'local_process://my_big_file',
…

Atnaize
- 1,766
- 5
- 25
- 54
0
votes
0 answers
Run out of memory writing files to zip with flysystem
I'm programming a tool that gathers images uploaded by a user into a zip-archive. For this I came across ZipArchiveAdapter from Flysystem that seems to do a good job.
I'm encountering an issue with the memory limit when the amount of files in the…

user1015149
- 187
- 1
- 10
0
votes
3 answers
renaming a file before uploading to digital ocean spaces using laravel
To upload a file I use
Storage::disk('spaces')->putFile('uploads', $request->file, 'public');
The file is saved successfully on digital ocean spaces. But I want to rename it to something like this user_1_some_random_string.jpg. And then save…

Noob Coder
- 2,816
- 8
- 36
- 61
0
votes
1 answer
How does Flysystem work internally?
I'm referring to https://flysystem.thephpleague.com/
Let's suppose I'm using the DropBox adapter. I am unclear as to which of the 2 process flows flysystem use. I have googled on this topic but have not seen any clear answer.
Assume a scenario where…
0
votes
0 answers
Why imagecreatefromstring returns a resource with invalid pointer?
This is my scenario:
I receive a base64 image and my goal is to upload a jpg to S3 through the Flysystem library. I'm on Symfony 3.3.9.
Actually I reiceive this error when I try to use the writeStream method.
ftell(): supplied resource is not a…

stuzzo
- 1,056
- 1
- 15
- 36
0
votes
0 answers
SFTP storage file with thephpleague/flysystem-sftp
I want to upload a file in a sftp account with the package https://github.com/thephpleague/flysystem-sftp
But i don't know really how to achieve the storage of the file.
Hope someone could help me and show me how to store the $file
Here my…

Mathieu Mourareau
- 1,140
- 2
- 23
- 47
0
votes
2 answers
Include/require file from Flysystem
My PHP application dynamically generates some script files that are later run by using require or include.
I'm now in the process of migrating my production server to Amazon Web Services, to get scaling and load balancing. This means that the…

Magnar Myrtveit
- 2,432
- 3
- 30
- 51
0
votes
0 answers
Symfony Flysystem S3 imagine uploads
I am currently using vich_uploader to upload files to S3 (this works correctly). However now I also want to apply some liip_imagine filter_sets, the current config.yml looks like:
liip_imagine:
loaders:
loader_aws_s3_images:
…

T Max
- 31
- 5