Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Gotipath Storage is a file storage library for PHP. It provides one interface to interact with FTP/SFTP. When you use this package, you're protected from vendor lock-in, That mean you can connect to any FTP/SFTP storage. Also it's comes with base URL option to connect Gotipath CDN.

License

Notifications You must be signed in to change notification settings

gotipath/storage

Repository files navigation

Gotipath Object storage

Gotipath Storage is a file storage library for PHP. It provides one interface to interact with FTP/SFTP. When you use this package, you're protected from vendor lock-in, That mean you can connect to any FTP/SFTP storage. Also it's comes with base URL option to connect Gotipath CDN.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads


This package can be used as a framework-agnostic package. Follow these steps to get started:

Installation

You can install the package via composer:

composer require gotipath/storage

Usage

require_once __DIR__ . '/vendor/autoload.php';
$storage = new Storage('sftp', [
 'host' => 'ftp.fas.xyx.com',
 'username' => 'sftp/ftp username',
 'password' => 'sftp/ftp password',
 //if you connecting ssh
 // 'privateKey' => '/path/to/privateKey',
// 'password' => 'encryption-password',
 'port' => 22,
 'root' => '/pub',
 'timeout' => 30,
],$baseUrl='https://cdn.gotipath.com');

create directory

 $path = 'uploads/testdir';
 $config = []; // optional
 $storage->makeDirectory($path, $config);

get file

 $storage->get($path);

multipart/formdata upload

 $inputFile = $_FILES['file'];
 $path = 'uploads/'.$inputFile['name'];
 $temp = $_FILES["file"]["tmp_name"];
 $storage->upload($path,$temp);

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Gotipath Storage is a file storage library for PHP. It provides one interface to interact with FTP/SFTP. When you use this package, you're protected from vendor lock-in, That mean you can connect to any FTP/SFTP storage. Also it's comes with base URL option to connect Gotipath CDN.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /