Skip to content

Commit 86cb1ce

Browse files
committed
Added section describing the file uploading rules. Ref: #5. a18673866971731
1 parent cd90383 commit 86cb1ce

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Contents:
2020
errors
2121
options
2222
dates
23+
upload
2324
tutorial
2425
tenders
2526
procuring

docs/source/procuring.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Uploading documentation
2929
~~~~~~~~~~~~~~~~~~~~~~~
3030

3131
All tender documentation should be uploaded following requests one request
32-
per document. You can see supported request types in Documents Uploading section.
32+
per document. You can see supported request types in :ref:`upload` section.
3333

3434
.. sourcecode:: http
3535

@@ -69,7 +69,7 @@ Changing existing documents
6969
~~~~~~~~~~~~~~~~~~~~~~~~~~~
7070

7171
Procuring Entity can upload new versions of the tender documentation. You
72-
can see supported request types in Documents Uploading section.
72+
can see supported request types in :ref:`upload` section.
7373

7474
.. sourcecode:: http
7575

docs/source/upload.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _upload:
2+
3+
Documents Uploading
4+
===================
5+
6+
All of the document uploading API endpoints follows the same set of rules.
7+
8+
Content-Type: multipart/formdata
9+
--------------------------------
10+
11+
This is normal approach of file uploading defined by `RFC 1867
12+
<http://www.faqs.org/rfcs/rfc1867.html>`_. The requirements are:
13+
14+
* Form element should have name `file`
15+
* Only one document can be uploaded.
16+
17+
The cURL example::
18+
19+
curl --form file=@page.pdf http://api-sandbox.openprocurement.org/api/0/tenders/f6882fa63d5141bcabec54a4766eec61/documents
20+
21+
HTTPie example::
22+
23+
http -f POST http://api-sandbox.openprocurement.org/api/0/tenders/f6882fa63d5141bcabec54a4766eec61/documents file@page.pdf
24+

0 commit comments

Comments
 (0)