diff --git a/xep-0231.xml b/xep-0231.xml index 49cedf85..0912604f 100644 --- a/xep-0231.xml +++ b/xep-0231.xml @@ -62,7 +62,7 @@

The format for including binary data is straightforward: the data is encapsulated as the XML character data of a <data/> element, where the data MUST be encoded as Base64 in accordance with Section 4 of &rfc4648; (note: the Base64 output MUST NOT include whitespace and MUST set the number of pad bits to zero).

-

The <data/> element SHOULD be used only to encapsulate small bits of binary data and SHOULD NOT be used for large data transfers. Naturally the definition of "small" and "large" is rather loose. In general, it is recommended that the data should not be more than 4 kilobytes and that dedicated file transfer methods should be used for exchanging blobs of data larger than 4 kilobytes. Naturally, implementations or deployments may impose their own limits.

+

The <data/> element SHOULD be used only to encapsulate small bits of binary data and SHOULD NOT be used for large data transfers. Naturally the definitions of "small" and "large" are rather loose. In general, it is recommended that the data should not be more than 8 kilobytes and that dedicated file transfer methods should be used for exchanging blobs of data larger than 8 kilobytes. Naturally, implementations or deployments may impose their own limits.

The following attributes are defined for the <data/> element.

@@ -187,12 +187,18 @@ -

&xep0221; describes how to include a media element in &xep0004;, e.g. for the purpose of placing a human-viewable "CAPTCHA" in a form that is used for &xep0158; or &xep0077;. The <media/> element described in XEP-0221 contains one or more <uri/> elements (which point to locations where the media can be downloaded, e.g. via HTTP) as well as a <data/> element that includes the data itself. The proposed <media/> element could be redefined to contain a <data/> element as described herein and shown in the following example.

+

&xep0221; describes how to include a media element in &xep0004;, e.g. for the purpose of placing a human-viewable "CAPTCHA" in a form that is used for &xep0158; or &xep0077;. The <media/> element described in XEP-0221 contains one or more <uri/> elements (which point to locations where the media can be downloaded, e.g. via HTTP) as well as a <data/> element that includes the data itself. The <media/> element would contain a <data/> element as described herein and shown in the following example.

- http://victim.example.com/challenges/speech.wav?F3A6292C - http://victim.example.com/challenges/speech.ogg?F3A6292C - http://victim.example.com/challenges/speech.mp3?F3A6292C + + + http://victim.example.com/challenges/speech.wav?F3A6292C + + + http://victim.example.com/challenges/speech.ogg?F3A6292C + + + http://victim.example.com/challenges/speech.mp3?F3A6292C + @@ -200,11 +206,11 @@ ]]> -

The media could then be included in a data form.

+

The media would then be included in a data form as illustrated in XEP-0221.

-

A previous proposal See <http://www.xmpp.org/extensions/inbox/file-preview.html>. described a method for including a thumbnail or file preview in a file transfer request. Such a preview can be included using the <data/> element, as shown below. However, a preview SHOULD not be included unless the receiving entity advertises (via &xep0030; or &xep0115;) support for the "urn:xmpp:tmp:file-preview" service discovery feature &NSNOTE;.

+

A previous proposal See <http://www.xmpp.org/extensions/inbox/file-preview.html>. described a method for including a thumbnail or file preview in a file transfer request. Such a preview can be included using the <data/> element, as shown below. However, a preview SHOULD NOT be included unless the receiving entity advertises (via &xep0030; or &xep0115;) support for the "urn:xmpp:tmp:file-preview" service discovery feature &NSNOTE;.