mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 23:38:26 +01:00
Update content of files
This commit is contained in:
parent
f3474d6342
commit
0c4ccf5f95
1 changed files with 2 additions and 2 deletions
|
@ -118,11 +118,11 @@ After the entire file is successfully saved, the final method may be called and
|
|||
<p>This is useful for example when converting a video, to avoid buffering the entire converted video on the filesystem, each part is uploaded immediately as soon as it is produced by the encoder. </p>
|
||||
<p>Everything works similarly to <a href="#uploading-files">normal uploads</a>, with a few key differences:</p>
|
||||
<ul>
|
||||
<li>The client buffers up to <code>part_size</code> bytes before immediately uploading the part as described <a href="#uploading-files">in the previous section</a>. </li>
|
||||
<li>The client buffers <code>part_size</code> bytes (or less if the stream ends) before immediately uploading the part as described <a href="#uploading-files">in the previous section</a>. </li>
|
||||
<li><a href="/method/upload.saveBigFilePart">upload.saveBigFilePart</a> must always be used, even if the stream turns out to be smaller than 10MB. </li>
|
||||
<li>The <code>file_total_parts</code> field must be set to <code>-1</code> for all parts except for the last one, using the following logic:<ul>
|
||||
<li>If the stream ends and the length of the buffered part is bigger than 0, upload it, setting <code>file_total_parts=ceil(totalFileSize/partSize)</code> (like for normal uploads)</li>
|
||||
<li>If the stream ends and the length of the buffered part is equal to 0, upload one more empty part (<code>strlen(bytes)=0</code>), setting <code>file_total_parts=ceil(totalFileSize/partSize)</code> (like for normal uploads)</li>
|
||||
<li>If the stream ends and the length of the buffered part is equal to 0, upload one more empty part, setting <code>file_total_parts=ceil(totalFileSize/partSize)</code> (like for normal uploads)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue