2025-07-17 10:05:47 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Default Filesystem Disk
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Here you may specify the default filesystem disk that should be used
|
|
|
|
|
| by the framework. The "local" disk, as well as a variety of cloud
|
|
|
|
|
| based disks are available to your application for file storage.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'default' => env('FILESYSTEM_DISK', 'local'),
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Filesystem Disks
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Below you may configure as many filesystem disks as necessary, and you
|
|
|
|
|
| may even configure multiple disks for the same driver. Examples for
|
|
|
|
|
| most supported storage drivers are configured here for reference.
|
|
|
|
|
|
|
|
|
|
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'disks' => [
|
|
|
|
|
|
|
|
|
|
'local' => [
|
|
|
|
|
'driver' => 'local',
|
|
|
|
|
'root' => storage_path('app/private'),
|
|
|
|
|
'serve' => true,
|
|
|
|
|
'throw' => false,
|
|
|
|
|
'report' => false,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'public' => [
|
|
|
|
|
'driver' => 'local',
|
|
|
|
|
'root' => storage_path('app/public'),
|
|
|
|
|
'url' => env('APP_URL').'/storage',
|
|
|
|
|
'visibility' => 'public',
|
|
|
|
|
'throw' => false,
|
|
|
|
|
'report' => false,
|
|
|
|
|
],
|
|
|
|
|
|
feat: 파일 저장 시스템 DB 마이그레이션
- enhance_files_table: 이중 파일명 시스템 (display_name/stored_name), 폴더 관리, 문서 연결 지원
- create_folders_table: 동적 폴더 관리 시스템 (tenant별 커스터마이징 가능)
- 5개 stub 마이그레이션 생성 (file_share_links, file_deletion_logs, storage_usage_history, add_storage_columns_to_tenants)
- FolderSeeder stub 생성
- CURRENT_WORKS.md에 Phase 1 진행상황 문서화
fix: 파일 공유 및 삭제 기능 버그 수정
- ShareLinkRequest: PATH 파라미터 {id}를 file_id로 자동 병합
- routes/api.php: 공유 링크 다운로드를 auth.apikey 그룹 밖으로 이동 (인증 불필요)
- FileShareLink: File, Tenant 클래스 import 추가
- File 모델: softDeleteFile()에서 SoftDeletes의 delete() 메서드 사용
- FileStorageService: getTrash(), restoreFile(), permanentDelete()에서 onlyTrashed() 사용
- File 모델: Tenant 네임스페이스 수정 (App\Models\Tenants\Tenant)
refactor: Swagger 문서 정리 - File 태그를 Files로 통합
- FileApi.php의 모든 태그를 Files로 변경
- 구 파일 시스템 라우트 삭제 (prefix 'file')
- 구 FileController.php 삭제
- 신규 파일 저장소 시스템으로 완전 통합
fix: 모든 legacy 파일 컬럼 nullable 일괄 처리
- 5개 legacy 컬럼을 한 번에 nullable로 변경
* original_name, file_name, file_name_old (string)
* fileable_id, fileable_type (polymorphic)
- foreach 루프로 반복 작업 자동화
- 신규/기존 시스템 간 완전한 하위 호환성 확보
fix: legacy 파일 컬럼 nullable 처리 완료
- file_name, file_name_old 컬럼도 nullable로 변경
- 기존 시스템과 신규 시스템 간 완전한 하위 호환성 확보
- Legacy: original_name, file_name, file_name_old (nullable)
- New: display_name, stored_name (required)
fix: original_name 컬럼 nullable 처리
- original_name을 nullable로 변경하여 하위 호환성 유지
- 새 시스템에서는 display_name 사용, 기존 시스템은 original_name 사용 가능
fix: 파일 업로드 DB 컬럼 누락 및 메시지 구조 개선
- files 테이블에 감사 컬럼 추가 (created_by, updated_by, uploaded_by)
- ApiResponse::handle() 메시지 로직 개선 (접미사 제거)
- 다국어 지원을 위한 완성된 문장 구조 유지
- FileUploadRequest 파일 검증 규칙 수정
fix: 파일 저장소 버그 수정 및 신규 테넌트 폴더 자동 생성
- FolderSeeder 네임스페이스 수정 (App\Models\Tenant → App\Models\Tenants\Tenant)
- FileStorageController use 문 구문 오류 수정 (/ → \)
- TenantObserver에 신규 테넌트 기본 폴더 자동 생성 로직 추가
- 5개 기본 폴더 (생산관리, 품질관리, 회계, 인사, 일반)
- 에러 처리 및 로깅
- 회원가입 시 자동 실행
2025-11-10 19:08:56 +09:00
|
|
|
'tenant' => [
|
|
|
|
|
'driver' => 'local',
|
|
|
|
|
'root' => storage_path('app/tenants'),
|
|
|
|
|
'visibility' => 'private',
|
|
|
|
|
'throw' => false,
|
|
|
|
|
'report' => false,
|
|
|
|
|
],
|
|
|
|
|
|
2026-01-30 19:53:09 +09:00
|
|
|
'app_releases' => [
|
|
|
|
|
'driver' => 'local',
|
|
|
|
|
'root' => storage_path('app/releases'),
|
|
|
|
|
'visibility' => 'private',
|
|
|
|
|
'throw' => false,
|
|
|
|
|
'report' => false,
|
|
|
|
|
],
|
|
|
|
|
|
2025-07-17 10:05:47 +09:00
|
|
|
's3' => [
|
|
|
|
|
'driver' => 's3',
|
|
|
|
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
|
|
|
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
|
|
|
|
'region' => env('AWS_DEFAULT_REGION'),
|
|
|
|
|
'bucket' => env('AWS_BUCKET'),
|
|
|
|
|
'url' => env('AWS_URL'),
|
|
|
|
|
'endpoint' => env('AWS_ENDPOINT'),
|
|
|
|
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
|
|
|
|
'throw' => false,
|
|
|
|
|
'report' => false,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
feat: 파일 저장 시스템 DB 마이그레이션
- enhance_files_table: 이중 파일명 시스템 (display_name/stored_name), 폴더 관리, 문서 연결 지원
- create_folders_table: 동적 폴더 관리 시스템 (tenant별 커스터마이징 가능)
- 5개 stub 마이그레이션 생성 (file_share_links, file_deletion_logs, storage_usage_history, add_storage_columns_to_tenants)
- FolderSeeder stub 생성
- CURRENT_WORKS.md에 Phase 1 진행상황 문서화
fix: 파일 공유 및 삭제 기능 버그 수정
- ShareLinkRequest: PATH 파라미터 {id}를 file_id로 자동 병합
- routes/api.php: 공유 링크 다운로드를 auth.apikey 그룹 밖으로 이동 (인증 불필요)
- FileShareLink: File, Tenant 클래스 import 추가
- File 모델: softDeleteFile()에서 SoftDeletes의 delete() 메서드 사용
- FileStorageService: getTrash(), restoreFile(), permanentDelete()에서 onlyTrashed() 사용
- File 모델: Tenant 네임스페이스 수정 (App\Models\Tenants\Tenant)
refactor: Swagger 문서 정리 - File 태그를 Files로 통합
- FileApi.php의 모든 태그를 Files로 변경
- 구 파일 시스템 라우트 삭제 (prefix 'file')
- 구 FileController.php 삭제
- 신규 파일 저장소 시스템으로 완전 통합
fix: 모든 legacy 파일 컬럼 nullable 일괄 처리
- 5개 legacy 컬럼을 한 번에 nullable로 변경
* original_name, file_name, file_name_old (string)
* fileable_id, fileable_type (polymorphic)
- foreach 루프로 반복 작업 자동화
- 신규/기존 시스템 간 완전한 하위 호환성 확보
fix: legacy 파일 컬럼 nullable 처리 완료
- file_name, file_name_old 컬럼도 nullable로 변경
- 기존 시스템과 신규 시스템 간 완전한 하위 호환성 확보
- Legacy: original_name, file_name, file_name_old (nullable)
- New: display_name, stored_name (required)
fix: original_name 컬럼 nullable 처리
- original_name을 nullable로 변경하여 하위 호환성 유지
- 새 시스템에서는 display_name 사용, 기존 시스템은 original_name 사용 가능
fix: 파일 업로드 DB 컬럼 누락 및 메시지 구조 개선
- files 테이블에 감사 컬럼 추가 (created_by, updated_by, uploaded_by)
- ApiResponse::handle() 메시지 로직 개선 (접미사 제거)
- 다국어 지원을 위한 완성된 문장 구조 유지
- FileUploadRequest 파일 검증 규칙 수정
fix: 파일 저장소 버그 수정 및 신규 테넌트 폴더 자동 생성
- FolderSeeder 네임스페이스 수정 (App\Models\Tenant → App\Models\Tenants\Tenant)
- FileStorageController use 문 구문 오류 수정 (/ → \)
- TenantObserver에 신규 테넌트 기본 폴더 자동 생성 로직 추가
- 5개 기본 폴더 (생산관리, 품질관리, 회계, 인사, 일반)
- 에러 처리 및 로깅
- 회원가입 시 자동 실행
2025-11-10 19:08:56 +09:00
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| File Upload Constraints
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Configure file upload constraints such as maximum file size and
|
|
|
|
|
| allowed file types for the file storage system.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'file_constraints' => [
|
|
|
|
|
'max_file_size' => env('FILE_MAX_SIZE', 20 * 1024 * 1024), // 20MB default
|
|
|
|
|
'allowed_extensions' => [
|
|
|
|
|
'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',
|
|
|
|
|
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg',
|
|
|
|
|
'zip', 'rar', '7z', 'tar', 'gz',
|
|
|
|
|
'txt', 'csv', 'xml', 'json',
|
|
|
|
|
],
|
|
|
|
|
'allowed_mimes' => [
|
|
|
|
|
'application/pdf',
|
|
|
|
|
'application/msword',
|
|
|
|
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
|
|
|
'application/vnd.ms-excel',
|
|
|
|
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
|
|
|
'application/vnd.ms-powerpoint',
|
|
|
|
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
|
|
|
'image/jpeg',
|
|
|
|
|
'image/png',
|
|
|
|
|
'image/gif',
|
|
|
|
|
'image/bmp',
|
|
|
|
|
'image/svg+xml',
|
|
|
|
|
'application/zip',
|
|
|
|
|
'application/x-rar-compressed',
|
|
|
|
|
'application/x-7z-compressed',
|
|
|
|
|
'application/x-tar',
|
|
|
|
|
'application/gzip',
|
|
|
|
|
'text/plain',
|
|
|
|
|
'text/csv',
|
|
|
|
|
'application/xml',
|
|
|
|
|
'application/json',
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Storage Policies
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Configure storage quota policies, cleanup schedules, and retention
|
|
|
|
|
| periods for the file storage system.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'storage_policies' => [
|
|
|
|
|
'default_limit' => env('STORAGE_DEFAULT_LIMIT', 10 * 1024 * 1024 * 1024), // 10GB
|
|
|
|
|
'warning_threshold' => 0.9, // 90%
|
|
|
|
|
'grace_period_days' => 7,
|
|
|
|
|
'temp_cleanup_days' => 7,
|
|
|
|
|
'trash_retention_days' => 30,
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Share Link Configuration
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Configure default settings for file share links including expiry
|
|
|
|
|
| time and maximum download limits.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'share_link' => [
|
|
|
|
|
'expiry_hours' => env('SHARE_LINK_EXPIRY_HOURS', 24),
|
|
|
|
|
'max_downloads' => env('SHARE_LINK_MAX_DOWNLOADS', null), // null = unlimited
|
|
|
|
|
],
|
|
|
|
|
|
2025-07-17 10:05:47 +09:00
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Symbolic Links
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Here you may configure the symbolic links that will be created when the
|
|
|
|
|
| `storage:link` Artisan command is executed. The array keys should be
|
|
|
|
|
| the locations of the links and the values should be their targets.
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
'links' => [
|
|
|
|
|
public_path('storage') => storage_path('app/public'),
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
];
|