You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root folder is not created when is missing and UnableToWriteFile exception is thrown
Note: It is created though if the path contains a prefix.
How to reproduce
useLeague\Flysystem\Config;
useLeague\Flysystem\PhpseclibV3\SftpAdapter;
useLeague\Flysystem\PhpseclibV3\SftpConnectionProvider;
$provider = SftpConnectionProvider::fromArray([
'driver' => 'sftp',
'host' => 'domain',
'username' => 'username',
'password' => 'password',
]);
$adapter = newSftpAdapter(
connectionProvider: $provider,
root: 'uploads'
);
// Make sure that "uploads" folder is missing on remote server before each test// ❌ Case 1: UnableToWriteFile exception is thrown// I expect to work and file to be uploaded at /uploads/file.txt$adapter->write('file.txt', 'content', newConfig());
// ✅ Case 2: File is uploaded at /uploads/parent_folder/file.txt even if the "uploads" folder doesn't exist$adapter->write('parent_folder/file.txt', 'content', newConfig());
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
Root folder is not created when is missing and UnableToWriteFile exception is thrown
Note: It is created though if the path contains a prefix.
How to reproduce
The text was updated successfully, but these errors were encountered: