Add Files page upload flow with manual folders and duplicate handling.
Deploy Ladill Transfer / deploy (push) Successful in 44s
Deploy Ladill Transfer / deploy (push) Successful in 44s
Users can create folders, upload files or folders, and choose replace or keep both on name conflicts instead of auto-grouping by transfer. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -34,11 +34,15 @@ class Transfer extends Model
|
||||
'grace_ends_at',
|
||||
'last_billed_at',
|
||||
'status',
|
||||
'is_folder',
|
||||
'is_root_storage',
|
||||
'downloads_total',
|
||||
'storage_bytes',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_folder' => 'boolean',
|
||||
'is_root_storage' => 'boolean',
|
||||
'retention_days' => 'integer',
|
||||
'expires_at' => 'datetime',
|
||||
'paid_until' => 'datetime',
|
||||
@@ -157,6 +161,21 @@ class Transfer extends Model
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeStorageFolders(Builder $query): Builder
|
||||
{
|
||||
return $query->where('is_folder', true);
|
||||
}
|
||||
|
||||
public function isStorageContainer(): bool
|
||||
{
|
||||
return $this->is_folder || $this->is_root_storage;
|
||||
}
|
||||
|
||||
public function shouldPersistWhenEmpty(): bool
|
||||
{
|
||||
return $this->is_folder || $this->is_root_storage;
|
||||
}
|
||||
|
||||
public function wantsRecipientMilestone(string $milestone): bool
|
||||
{
|
||||
return in_array($milestone, (array) ($this->recipient_email_milestones ?? []), true);
|
||||
|
||||
Reference in New Issue
Block a user