updated uploading store
This commit is contained in:
@@ -196,8 +196,15 @@ class AdminController extends Controller
|
|||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
|
||||||
Storage::disk('uploads')->put('/teamstore/' . $store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+'));
|
// Storage::disk('uploads')->put('/teamstore/' . $store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+'));
|
||||||
Storage::disk('uploads')->put('/teamstore/' . $store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+'));
|
// Storage::disk('uploads')->put('/teamstore/' . $store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+'));
|
||||||
|
// Storage::disk('sftp')->put('/teamstore/' . $store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+'));
|
||||||
|
// Storage::disk('sftp')->put('/teamstore/' . $store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+'));
|
||||||
|
|
||||||
|
$filesystem = Storage::disk('sftp');
|
||||||
|
$filesystem->getDriver()->getAdapter()->setDirectoryPerm(0755);
|
||||||
|
$filesystem->put('/teamstore/' . $store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+'));
|
||||||
|
$filesystem->put('/teamstore/' . $store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+'));
|
||||||
|
|
||||||
return response()->json(array(
|
return response()->json(array(
|
||||||
'success' => true,
|
'success' => true,
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Storage;
|
||||||
|
use League\Flysystem\Filesystem;
|
||||||
|
use League\Flysystem\Sftp\SftpAdapter;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@@ -14,6 +17,10 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
||||||
|
Storage::extend('sftp', function ($app, $config) {
|
||||||
|
return new Filesystem(new SftpAdapter($config));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.9",
|
"php": ">=5.5.9",
|
||||||
"laravel/framework": "5.2.*"
|
"laravel/framework": "5.2.*",
|
||||||
|
"league/flysystem-sftp": "1.0.22"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
|
|||||||
162
composer.lock
generated
162
composer.lock
generated
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "8b1485987e7c5949da82435d403e52e8",
|
"content-hash": "af8d6f68d559b9573b148063cd25b63b",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "classpreloader/classpreloader",
|
"name": "classpreloader/classpreloader",
|
||||||
@@ -518,6 +518,52 @@
|
|||||||
],
|
],
|
||||||
"time": "2019-02-01T08:50:36+00:00"
|
"time": "2019-02-01T08:50:36+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "league/flysystem-sftp",
|
||||||
|
"version": "1.0.22",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/flysystem-sftp.git",
|
||||||
|
"reference": "cab59dd2277e02fe46f5f23195672a02ed49774d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/cab59dd2277e02fe46f5f23195672a02ed49774d",
|
||||||
|
"reference": "cab59dd2277e02fe46f5f23195672a02ed49774d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"league/flysystem": "~1.0",
|
||||||
|
"php": ">=5.6.0",
|
||||||
|
"phpseclib/phpseclib": "~2.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "0.9.*",
|
||||||
|
"phpunit/phpunit": "^5.7.25"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\Flysystem\\Sftp\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "info@frenky.net"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Flysystem adapter for SFTP",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/thephpleague/flysystem-sftp/issues",
|
||||||
|
"source": "https://github.com/thephpleague/flysystem-sftp/tree/master"
|
||||||
|
},
|
||||||
|
"time": "2019-10-16T20:05:49+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "1.24.0",
|
"version": "1.24.0",
|
||||||
@@ -797,6 +843,115 @@
|
|||||||
],
|
],
|
||||||
"time": "2018-04-04T21:48:54+00:00"
|
"time": "2018-04-04T21:48:54+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "phpseclib/phpseclib",
|
||||||
|
"version": "2.0.32",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||||
|
"reference": "f5c4c19880d45d0be3e7d24ae8ac434844a898cd"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f5c4c19880d45d0be3e7d24ae8ac434844a898cd",
|
||||||
|
"reference": "f5c4c19880d45d0be3e7d24ae8ac434844a898cd",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phing/phing": "~2.7",
|
||||||
|
"phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
|
||||||
|
"squizlabs/php_codesniffer": "~2.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
|
||||||
|
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
|
||||||
|
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
|
||||||
|
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"phpseclib/bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"phpseclib\\": "phpseclib/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jim Wigginton",
|
||||||
|
"email": "terrafrost@php.net",
|
||||||
|
"role": "Lead Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Patrick Monnerat",
|
||||||
|
"email": "pm@datasphere.ch",
|
||||||
|
"role": "Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Andreas Fischer",
|
||||||
|
"email": "bantu@phpbb.com",
|
||||||
|
"role": "Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Hans-Jürgen Petrich",
|
||||||
|
"email": "petrich@tronic-media.com",
|
||||||
|
"role": "Developer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "graham@alt-three.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
|
||||||
|
"homepage": "http://phpseclib.sourceforge.net",
|
||||||
|
"keywords": [
|
||||||
|
"BigInteger",
|
||||||
|
"aes",
|
||||||
|
"asn.1",
|
||||||
|
"asn1",
|
||||||
|
"blowfish",
|
||||||
|
"crypto",
|
||||||
|
"cryptography",
|
||||||
|
"encryption",
|
||||||
|
"rsa",
|
||||||
|
"security",
|
||||||
|
"sftp",
|
||||||
|
"signature",
|
||||||
|
"signing",
|
||||||
|
"ssh",
|
||||||
|
"twofish",
|
||||||
|
"x.509",
|
||||||
|
"x509"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||||
|
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.32"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/terrafrost",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpseclib",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-06-12T12:12:59+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@@ -3259,5 +3414,6 @@
|
|||||||
"platform": {
|
"platform": {
|
||||||
"php": ">=5.5.9"
|
"php": ">=5.5.9"
|
||||||
},
|
},
|
||||||
"platform-dev": []
|
"platform-dev": [],
|
||||||
|
"plugin-api-version": "2.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,17 @@ return [
|
|||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => env('UPLOAD_FOLDER_PATH'),
|
'root' => env('UPLOAD_FOLDER_PATH'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'sftp' => [
|
||||||
|
'driver' => 'sftp',
|
||||||
|
'host' => '35.232.234.8',
|
||||||
|
'port' => 22,
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => '',
|
||||||
|
'privateKey' => storage_path('keys/crewsportswear_app.ppk') . '',
|
||||||
|
'root' => '/var/www/html/images/merchbay',
|
||||||
|
'timeout' => 10
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
<!--------------------------
|
<!--------------------------
|
||||||
| Your Page Content Here |
|
| Your Page Content Here |
|
||||||
-------------------------->
|
-------------------------->
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<!-- /.content -->
|
<!-- /.content -->
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
28
storage/keys/crewsportswear_app.key
Normal file
28
storage/keys/crewsportswear_app.key
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDNeR+2rEElG4na
|
||||||
|
UI9Nv27noSfi8saDAFw5Z9i2+sPhugeWIsFpLXvQrzIf5R5gamJHui9h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oM1TlQCVcvrTW0ylccBfBjmfN+rQPbXdle4I7EA1Al
|
||||||
|
K6bqCieC6FUCgYB6ee4bGZuy0zliDRtb+4Rs8Aqnwry5T0loge+/t8K2Y96kSLvo
|
||||||
|
buRcNmrtWKL875VF9tRJk83LJYkcEFXjS/PfxAiHuJbSYddXgRsF4IY3D3BsaQaW
|
||||||
|
QMByCoDv+jlRWDHE0VKpxvSZxq8s/HOgwezoBFALsFipONOg2rs40sgnpQKBgDJs
|
||||||
|
SWZzlMum7q3y1fHBdHQTL2Wgd370xSy5kKhxmof4K9W2oQmx0aF0W3ocnRZdnycM
|
||||||
|
M4FnwqJf6y/okmBlG9sDsz2NhgVdkv67FemDkdOo2UDcuHzar4jf2CdNXxlJdFLq
|
||||||
|
HiTDjE4zBlEE2zjPs1k0aaAqXVEGrBAyOdKu3qkhAoGBAKECHYp/gIhDeIcNR5W/
|
||||||
|
32e9RmRUJGlqV8+kt2CjnQfV8ZgqaXC6Xyzeoq5cN2BPkVU0FClyTkVq2q9fKj5D
|
||||||
|
+1/X2M9tyGO8m/673qqqtBmi3PFJIniaqDNFwc1CyRlmeqEzMNemPpTPYFlYcSVj
|
||||||
|
6S9F35lLnlzDsUa1hBBgcafB
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
26
storage/keys/crewsportswear_app.ppk
Normal file
26
storage/keys/crewsportswear_app.ppk
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
PuTTY-User-Key-File-2: ssh-rsa
|
||||||
|
Encryption: none
|
||||||
|
Comment: imported-openssh-key
|
||||||
|
Public-Lines: 6
|
||||||
|
AAAAB3NzaC1yc2EAAAADAQABAAABAQDbZtTWP3ilu76hWxCMKXeEUuD+9wGzkViW
|
||||||
|
JDFYaBn52rufMEI/CJaJc0wwWfK9340oUamZLEFwoMZymEAcIL3ZfhJZW8CSUN12
|
||||||
|
ifkhmUXVGWhi4oGC3LsJrnZY8usG1byfdlSCHOm9FYwf/5GcFQVe966kgF4/MTDP
|
||||||
|
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NZHE4CfDU8M3/zaZ7WmJCRXf8QEfg54F
|
||||||
|
cr6Qvw1j9LOLS9C/tAzANFOwo5U5CpWB3k0mr+eqjlgGOdBX2ojhiYaLDOorgP6A
|
||||||
|
L3pU4xtcTqDjHpCABwH69TWnWho5lnKcBnWV0lvxcCnJDw==
|
||||||
|
Private-MAC: 385b11a436f1c7fbd10a06c5ae2b3fa19450c9c7
|
||||||
Reference in New Issue
Block a user