summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.4/guide/multipart/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy/2.4/guide/multipart/index.html')
-rw-r--r--docs/en/cowboy/2.4/guide/multipart/index.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/en/cowboy/2.4/guide/multipart/index.html b/docs/en/cowboy/2.4/guide/multipart/index.html
index 3bb5a8f7..d5da9b5a 100644
--- a/docs/en/cowboy/2.4/guide/multipart/index.html
+++ b/docs/en/cowboy/2.4/guide/multipart/index.html
@@ -73,7 +73,7 @@
<p>The browser does its best to determine the media type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p>
<h2 id="_checking_for_multipart_messages">Checking for multipart messages</h2>
<p>The content-type header indicates the presence of a multipart message:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -85,7 +85,7 @@ http://www.gnu.org/software/src-highlite -->
<p>The <code>cowboy_req:read_part/1,2</code> functions return the next part&apos;s headers, if any.</p>
<p>The <code>cowboy_req:read_part_body/1,2</code> functions return the current part&apos;s body. For large bodies you may need to call the function multiple times.</p>
<p>To read a multipart message you need to iterate over all its parts:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -101,7 +101,7 @@ http://www.gnu.org/software/src-highlite -->
<p>When part bodies are too large, Cowboy will return a <code>more</code> tuple, and allow you to loop until the part body has been fully read.</p>
<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. The function returns a <code>data</code> or a <code>file</code> tuple depending on whether this is a normal field or a file being uploaded.</p>
<p>The following snippet will use this function and use different strategies depending on whether the part is a file:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -130,14 +130,14 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>Both the part header and body reading functions can take options that will be given to the request body reading functions. By default, <code>cowboy_req:read_part/1</code> reads up to 64KB for up to 5 seconds. <code>cowboy_req:read_part_body/1</code> has the same defaults as <code>cowboy_req:read_body/1</code>.</p>
<p>To change the defaults for part headers:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">cowboy_req:read_part</font></b>(<font color="#009900">Req</font>, #{<b><font color="#000080">length</font></b> <font color="#990000">=&gt;</font> <font color="#993399">128000</font>})<font color="#990000">.</font></tt></pre>
</div></div>
<p>And for part bodies:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -146,7 +146,7 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
<p>Part bodies do not have to be read. Cowboy will automatically skip it when you request the next part&apos;s body.</p>
<p>The following snippet reads all part headers and skips all bodies:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -219,6 +219,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowboy/2.7/guide">2.7</a></li>
+
<li><a href="/docs/en/cowboy/2.6/guide">2.6</a></li>
<li><a href="/docs/en/cowboy/2.5/guide">2.5</a></li>