Last active
June 21, 2018 11:23
-
-
Save cygeorgel/1b30c61c7452305b40eb5bcdf954b762 to your computer and use it in GitHub Desktop.
Upload files to Ovh Public Cloud Storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// upload files to Ovh Public Cloud Storage | |
$files = Storage::disk('local')->files('/invoices/zoho/'); | |
$disks = ['swift', 'swiftAlt']; | |
foreach ($files as $file) { | |
$filename = str_replace('invoices/zoho/', '', $file); | |
$content = Storage::disk('local')->get($file); | |
foreach($disks as $disk) { | |
Storage::disk($disk)->put('production/zoho/invoices-pdf/' . $filename, $content); | |
} | |
print $file . PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment