Skip to content

Comments

S3 storage and backups with google#22

Merged
AllanKoder merged 13 commits intomasterfrom
s3-storage
Aug 15, 2025
Merged

S3 storage and backups with google#22
AllanKoder merged 13 commits intomasterfrom
s3-storage

Conversation

@AllanKoder
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings August 15, 2025 01:18

This comment was marked as outdated.

@AllanKoder AllanKoder requested a review from Copilot August 15, 2025 01:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates S3-compatible storage (Backblaze B2) and Google Drive for file storage and backup functionality. It modifies the filesystem configuration to support conditional S3 storage and adds a comprehensive backup system using Google Drive.

  • Replaces AWS S3 configuration with Backblaze B2 S3-compatible storage
  • Adds Google Drive storage driver configuration
  • Implements automated backup system with Google Drive as destination
  • Updates file URL generation to explicitly use public disk

Reviewed Changes

Copilot reviewed 10 out of 42 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
config/filesystems.php Replaces AWS S3 with Backblaze B2 configuration and adds Google Drive storage
config/backup.php New comprehensive backup configuration using Google Drive storage
composer.json Adds required packages for S3, Google Drive storage, and backup functionality
app/Models/*.php Updates Storage::url() calls to explicitly specify 'public' disk
app/Http/Requests/*.php Increases image file size limit from 400KB to 500KB
app/Http/Controllers/ComputerScienceResourceController.php Adds error handling for image storage failures
.env.example Updates environment variables for new storage and backup configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* The name of this application. You can use this name to monitor
* the backups.
*/
'name' => '', // Needs to be empty for some reason
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment 'Needs to be empty for some reason' is unclear and unhelpful. Please provide a more specific explanation of why the backup name must be empty or reference the relevant documentation.

Suggested change
'name' => '', // Needs to be empty for some reason
'name' => '', // Leave empty to use the default application name as determined by the Spatie Laravel Backup package. See https://spatie.be/docs/laravel-backup/v8/configuration#content-backup-name

Copilot uses AI. Check for mistakes.
'file_info' => $imageFile,
]);

$fileName = method_exists($imageFile, 'getClientOriginalName') ? $imageFile->getClientOriginalName() : 'unknown';
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method_exists check for 'getClientOriginalName' is unnecessary complexity. Laravel's UploadedFile class always has this method. Simplify to: $fileName = $imageFile->getClientOriginalName();

Suggested change
$fileName = method_exists($imageFile, 'getClientOriginalName') ? $imageFile->getClientOriginalName() : 'unknown';
$fileName = $imageFile->getClientOriginalName();

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AllanKoder AllanKoder merged commit 203e1d7 into master Aug 15, 2025
3 checks passed
@AllanKoder AllanKoder deleted the s3-storage branch August 15, 2025 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant