{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/flysystem-sftp/issues/7","labels_url":"https://api.github.com/repos/thephpleague/flysystem-sftp/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/flysystem-sftp/issues/7/comments","events_url":"https://api.github.com/repos/thephpleague/flysystem-sftp/issues/7/events","html_url":"https://github.com/thephpleague/flysystem-sftp/issues/7","id":72005770,"number":7,"title":"File upload","user":{"login":"matiux","id":821668,"avatar_url":"https://avatars.githubusercontent.com/u/821668?v=3","gravatar_id":"","url":"https://api.github.com/users/matiux","html_url":"https://github.com/matiux","followers_url":"https://api.github.com/users/matiux/followers","following_url":"https://api.github.com/users/matiux/following{/other_user}","gists_url":"https://api.github.com/users/matiux/gists{/gist_id}","starred_url":"https://api.github.com/users/matiux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiux/subscriptions","organizations_url":"https://api.github.com/users/matiux/orgs","repos_url":"https://api.github.com/users/matiux/repos","events_url":"https://api.github.com/users/matiux/events{/privacy}","received_events_url":"https://api.github.com/users/matiux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-29T22:21:29Z","updated_at":"2015-05-26T15:29:41Z","closed_at":null,"body":"I have a problem to upload in sftp...\r\nI use sylex with wyrihaximus/sli-fly service provider, league/flysystem-ziparchive and obviously league/flysystem-sftp.\r\n\r\nI have created a zip file and now I need to upload it on sftp server.\r\nThis is my config:\r\n\r\n```\r\n$app->register(new WyriHaximus\\SliFly\\FlysystemServiceProvider(), [\r\n\r\n    'flysystem.filesystems' => [\r\n        'zip' => [\r\n\r\n            'adapter'   => 'League\\Flysystem\\ZipArchive\\ZipArchiveAdapter',\r\n            'args'      => [\r\n\r\n                $app['root_dir'].'/web/file.zip',\r\n            ],\r\n        ],\r\n        'sftp' => [\r\n\r\n            'adapter'   => 'League\\Flysystem\\Sftp\\SftpAdapter',\r\n\r\n            'args'      => [\r\n\r\n                [\r\n                    'host'          => '192.241.178.210',\r\n                    'port'          => 22,\r\n                    'username'      => 'my_user,\r\n                    'password'      => 'my_password',\r\n                    'root'          => '/home/user/Documents/html/stream',\r\n                    'timeout'       => 30,\r\n                ]\r\n            ]\r\n        ]\r\n    ],\r\n]);\r\n```\r\n\r\nI create the zip file:\r\n\r\n```\r\n$this->filesystems['zip']->put('file.xml', $xml);\r\n```\r\n\r\nbut when I try to upload it\r\n\r\n```\r\n$this->filesystems['sftp']->put('file.zip', '/var/www/Projects/Acme/web/file.zip');\r\n```\r\n\r\nOn the server, file.zip was created, but it's a invalid file that I don't can open"},"comment":{"url":"https://api.github.com/repos/thephpleague/flysystem-sftp/issues/comments/105568498","html_url":"https://github.com/thephpleague/flysystem-sftp/issues/7#issuecomment-105568498","issue_url":"https://api.github.com/repos/thephpleague/flysystem-sftp/issues/7","id":105568498,"user":{"login":"WyriHaximus","id":147145,"avatar_url":"https://avatars.githubusercontent.com/u/147145?v=3","gravatar_id":"","url":"https://api.github.com/users/WyriHaximus","html_url":"https://github.com/WyriHaximus","followers_url":"https://api.github.com/users/WyriHaximus/followers","following_url":"https://api.github.com/users/WyriHaximus/following{/other_user}","gists_url":"https://api.github.com/users/WyriHaximus/gists{/gist_id}","starred_url":"https://api.github.com/users/WyriHaximus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WyriHaximus/subscriptions","organizations_url":"https://api.github.com/users/WyriHaximus/orgs","repos_url":"https://api.github.com/users/WyriHaximus/repos","events_url":"https://api.github.com/users/WyriHaximus/events{/privacy}","received_events_url":"https://api.github.com/users/WyriHaximus/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T15:29:41Z","updated_at":"2015-05-26T15:29:41Z","body":"@frankdejonge makes perfect sense to me: `$this->filesystems['sftp']->put('file.zip', file_get_contents($app['root_dir'].'/web/file.zip'));` should do the trick I suppose :smile: "}}