feat: Introduce FileVisibility enum and refactor FileUploadService to use it instead of magic strings for file access levels.
This commit is contained in:
@@ -10,6 +10,7 @@ library;
|
||||
export 'src/core/services/api_services/api_response.dart';
|
||||
export 'src/core/services/api_services/base_api_service.dart';
|
||||
export 'src/core/services/api_services/base_core_service.dart';
|
||||
export 'src/core/services/api_services/file_visibility.dart';
|
||||
|
||||
// Users & Membership
|
||||
export 'src/entities/users/user.dart';
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/// Represents the accessibility level of an uploaded file.
|
||||
enum FileVisibility {
|
||||
/// File is accessible only to authenticated owners/authorized users.
|
||||
private('private'),
|
||||
|
||||
/// File is accessible publicly via its URL.
|
||||
public('public');
|
||||
|
||||
/// Creates a [FileVisibility].
|
||||
const FileVisibility(this.value);
|
||||
|
||||
/// The string value expected by the backend.
|
||||
final String value;
|
||||
}
|
||||
Reference in New Issue
Block a user