@@ -444,7 +444,8 @@ The successful response includes the following JSON content:
444
444
"valid-for" : 3600 ,
445
445
"mechanism" : {
446
446
"http-post-application-octet-stream" : {
447
- "url" : " ..."
447
+ "file_url" : " ..."
448
+ "attestations_url" : " ..."
448
449
}
449
450
}
450
451
}
@@ -756,6 +757,36 @@ with that implementation's file upload mechanism name.
756
757
All implementations of this PEP **MUST ** implement the ``http-post-application-octet-stream `` file
757
758
upload mechanism.
758
759
760
+ ``http-post-application-octet-stream `` Mechanism
761
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
762
+
763
+ The ``http-post-application-octet-stream `` mechansism **MUST ** be supported servers which
764
+ implement this PEP.
765
+
766
+ A client executes this mechanism by submitting a ``POST `` request to the ``file_url `` returned in the
767
+ ``http-post-application-octet-stream `` map of the ``mechanism `` map of the
768
+ :ref: `file upload session creation response body <file-upload-session-response >` like:
769
+
770
+ .. code-block :: text
771
+
772
+ Content-Type: application/octet-stream
773
+
774
+ <binary contents of the file to upload>
775
+
776
+ Servers **MAY ** support uploading of digital attestations for files (see :pep: `740 `).
777
+ This support will be indicated by inclusion of an ``attestations_url `` key in the
778
+ ``http-post-application-octet-stream `` map of the ``mechanism `` map of the
779
+ :ref: `file upload session creation response body <file-upload-session-response >`.
780
+
781
+ To upload an attestation, a client submits a ``POST `` request to the ``attestations_url ``
782
+ containing a JSON array of :pep: `attestation objects <740#attestation-objects >` like:
783
+
784
+ .. code-block :: text
785
+
786
+ Content-Type: application/json
787
+
788
+ [{"version": 1, "verification_material": {...}, "envelope": {...}},...]
789
+
759
790
760
791
Content Types
761
792
-------------
0 commit comments