Skip to content

Commit deb480f

Browse files
FEATURE (storages): Add manual for Cloudflare R2
1 parent ec070d9 commit deb480f

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
### 🗄️ **Multiple Storage Destinations**
2929

3030
- **Local storage**: Keep backups on your VPS/server
31-
- **Cloud storage**: S3, Google Drive, Dropbox, and more (coming soon)
31+
- **Cloud storage**: S3, Cloudflare R2, Google Drive, Dropbox, and more (coming soon)
3232
- **Secure**: All data stays under your control
3333

3434
### 📱 **Smart Notifications**

backend/internal/features/storages/repository.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ func (r *StorageRepository) FindByUserID(userID uuid.UUID) ([]*Storage, error) {
8282
Preload("LocalStorage").
8383
Preload("S3Storage").
8484
Where("user_id = ?", userID).
85+
Order("name ASC").
8586
Find(&storages).Error; err != nil {
8687
return nil, err
8788
}

backend/internal/features/storages/storages/s3/model.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ func (s *S3Storage) Validate() error {
113113
if s.S3Bucket == "" {
114114
return errors.New("S3 bucket is required")
115115
}
116-
if s.S3Region == "" {
117-
return errors.New("S3 region is required")
118-
}
119116
if s.S3AccessKey == "" {
120117
return errors.New("S3 access key is required")
121118
}

frontend/src/features/storages/ui/edit/EditStorageComponent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export function EditStorageComponent({
120120
if (storage.type === StorageType.S3) {
121121
return (
122122
storage.s3Storage?.s3Bucket &&
123-
storage.s3Storage?.s3Region &&
124123
storage.s3Storage?.s3AccessKey &&
125124
storage.s3Storage?.s3SecretKey
126125
);

frontend/src/features/storages/ui/edit/storages/EditS3StorageComponent.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ interface Props {
1212
export function EditS3StorageComponent({ storage, setStorage, setIsUnsaved }: Props) {
1313
return (
1414
<>
15+
<div className="mb-2 flex items-center">
16+
<div className="min-w-[110px]" />
17+
18+
<div className="text-xs text-blue-600">
19+
<a href="https://postgresus.com/cloudflare-r2-storage" target="_blank" rel="noreferrer">
20+
How to use with Cloudflare R2?
21+
</a>
22+
</div>
23+
</div>
24+
1525
<div className="mb-1 flex items-center">
1626
<div className="min-w-[110px]">S3 Bucket</div>
1727
<Input

0 commit comments

Comments
 (0)