stash
This commit is contained in:
parent
3b494dfa37
commit
0f51f6e33f
14 changed files with 534 additions and 356 deletions
|
|
@ -203,9 +203,11 @@ class InventoryItemSerializer(serializers.ModelSerializer):
|
|||
|
||||
class WorkflowInstanceSerializer(serializers.ModelSerializer):
|
||||
owner = serializers.StringRelatedField(read_only=True)
|
||||
# The client already holds the full file (name, size, mime_type, base64 data) for anything it
|
||||
# staged itself - hash is the only thing it can't already know, so that's all this exposes,
|
||||
# unlike InventoryItemSerializer.files which needs the fuller FileSerializer representation.
|
||||
# Hash is enough to identify a staged file (the client computes the same SHA-256 the backend
|
||||
# does, and can fetch bytes from a hash-derived storage path) - for anything staged by *this*
|
||||
# session there's nothing more to say, and for a file staged elsewhere (another device/tab),
|
||||
# hash is what lets this session recognize and fetch it. Unlike InventoryItemSerializer.files,
|
||||
# no fuller FileSerializer representation is needed here.
|
||||
staged_files = serializers.SerializerMethodField()
|
||||
|
||||
class Meta:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue