feat: Introduce FileVisibility enum and refactor FileUploadService to use it instead of magic strings for file access levels.
This commit is contained in:
@@ -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