fix grammar (#3769)

This commit is contained in:
miquelvir 2020-09-28 15:21:59 +02:00 committed by GitHub
parent de464c03e1
commit 598c56c498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,8 +55,8 @@ the file and redirects the user to the URL for the uploaded file::
flash('No file part') flash('No file part')
return redirect(request.url) return redirect(request.url)
file = request.files['file'] file = request.files['file']
# if user does not select file, browser also # If the user does not select a file, the browser submits an
# submit an empty part without filename # empty file without a filename.
if file.filename == '': if file.filename == '':
flash('No selected file') flash('No selected file')
return redirect(request.url) return redirect(request.url)
@ -135,10 +135,10 @@ Improving Uploads
.. versionadded:: 0.6 .. versionadded:: 0.6
So how exactly does Flask handle uploads? Well it will store them in the So how exactly does Flask handle uploads? Well it will store them in the
webserver's memory if the files are reasonable small otherwise in a webserver's memory if the files are reasonably small, otherwise in a
temporary location (as returned by :func:`tempfile.gettempdir`). But how temporary location (as returned by :func:`tempfile.gettempdir`). But how
do you specify the maximum file size after which an upload is aborted? By do you specify the maximum file size after which an upload is aborted? By
default Flask will happily accept file uploads to an unlimited amount of default Flask will happily accept file uploads with an unlimited amount of
memory, but you can limit that by setting the ``MAX_CONTENT_LENGTH`` memory, but you can limit that by setting the ``MAX_CONTENT_LENGTH``
config key:: config key::
@ -167,10 +167,9 @@ Upload Progress Bars
A while ago many developers had the idea to read the incoming file in A while ago many developers had the idea to read the incoming file in
small chunks and store the upload progress in the database to be able to small chunks and store the upload progress in the database to be able to
poll the progress with JavaScript from the client. Long story short: the poll the progress with JavaScript from the client. The client asks the
client asks the server every 5 seconds how much it has transmitted server every 5 seconds how much it has transmitted, but this is
already. Do you realize the irony? The client is asking for something it something it should already know.
should already know.
An Easier Solution An Easier Solution
------------------ ------------------