V3 API: Enhance privacy by hiding internal file sharding paths and fix syntax in object definitions
This commit is contained in:
@@ -88,7 +88,7 @@ class Archive_Content_Base(BaseModel):
|
|||||||
# Including convenience data
|
# Including convenience data
|
||||||
# This is only for convenience. Probably going to keep unless it causes a problem.
|
# This is only for convenience. Probably going to keep unless it causes a problem.
|
||||||
hosted_file_hash_sha256: Optional[str]
|
hosted_file_hash_sha256: Optional[str]
|
||||||
hosted_file_subdirectory_path: Optional[str]
|
hosted_file_subdirectory_path: Optional[str] = Field(None, exclude=True)
|
||||||
hosted_file_content_type: Optional[str]
|
hosted_file_content_type: Optional[str]
|
||||||
hosted_file_size: Optional[str]
|
hosted_file_size: Optional[str]
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ class Event_File_Base(BaseModel):
|
|||||||
alias = 'hash_sha256'
|
alias = 'hash_sha256'
|
||||||
)
|
)
|
||||||
hosted_file_subdirectory_path: Optional[str] = Field( # NOTE: This will frequently only contain numbers, but it still needs to be a string
|
hosted_file_subdirectory_path: Optional[str] = Field( # NOTE: This will frequently only contain numbers, but it still needs to be a string
|
||||||
alias = 'subdirectory_path'
|
alias = 'subdirectory_path',
|
||||||
|
exclude = True
|
||||||
)
|
)
|
||||||
hosted_file_content_type: Optional[str] = Field(
|
hosted_file_content_type: Optional[str] = Field(
|
||||||
alias = 'content_type'
|
alias = 'content_type'
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class Hosted_File_Base(BaseModel):
|
|||||||
|
|
||||||
version: Optional[int]
|
version: Optional[int]
|
||||||
|
|
||||||
subdirectory_path: Optional[str] # NOTE: This will frequently only contain numbers, but it still needs to be a string
|
subdirectory_path: Optional[str] = Field(None, exclude=True) # NOTE: This will frequently only contain numbers, but it still needs to be a string
|
||||||
filename: Optional[str]
|
filename: Optional[str]
|
||||||
extension: Optional[str]
|
extension: Optional[str]
|
||||||
content_type: Optional[str]
|
content_type: Optional[str]
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ other_obj_li = {
|
|||||||
'account_id_random',
|
'account_id_random',
|
||||||
'title', 'description',
|
'title', 'description',
|
||||||
'filename', 'extension',
|
'filename', 'extension',
|
||||||
'content_type'
|
'content_type',
|
||||||
'enable'
|
'enable',
|
||||||
'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
'hide', 'priority', 'sort', 'group', 'notes', 'created_on', 'updated_on',
|
||||||
],
|
],
|
||||||
# V3 Search Security:
|
# V3 Search Security:
|
||||||
|
|||||||
Reference in New Issue
Block a user