Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17842

Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo
Date Sun, 16 Dec 2018 02:11:04 +0100
Lines 45
Message-ID <g7ln19Fagd9U1@mid.individual.net> (permalink)
References <4afe4c5b-25d8-4c61-ba76-1fb45b1d1203@googlegroups.com> <5c141a5a$0$22349$e4fe514c@news.xs4all.nl> <89fa34e7-c2fd-4853-8b45-4ecd194fc905@googlegroups.com> <5c14d447$0$22354$e4fe514c@news.xs4all.nl> <1c2f78d9-eb17-4b50-ba74-fdd2f51b333e@googlegroups.com> <5c1517b9$0$22354$e4fe514c@news.xs4all.nl>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace individual.net dO7CA9Z9TFMHWKE3OGUmnApY1ZZsU5NUwvXlqOlqPKWbi8L0CN
Cancel-Lock sha1:gJHyttdV3BC3/tfA++K/EzvaOY0=
Openpgp preference=signencrypt
In-Reply-To <5c1517b9$0$22354$e4fe514c@news.xs4all.nl>
Xref csiph.com comp.lang.php:17842

Show key headers only | View raw


Luuk:

[...]
> BTW, i did read this 2 minutes ago:
> http://php.net/manual/en/features.file-upload.post-method.php
> posted by Mark, 8 years ago:
> $_FILES will be empty if a user attempts to upload a file greater than 
> post_max_size in your php.ini
> 
> post_max_size should be >= upload_max_filesize in your php.ini.

If you read the text at the mentioned URL, you will also find a note
about how to tell the browser the size limit, so people don't try to
upload stuff, which is too large:

<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="__URL__" method="POST">
    <!-- MAX_FILE_SIZE must precede the file input field -->
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    <!-- Name of input element determines name in $_FILES array -->
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
</form>

The __URL__ in the above example should be replaced, and point to a PHP
file.

The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file
input field, and its value is the maximum filesize accepted by PHP. This
form element should always be used as it saves users the trouble of
waiting for a big file being transferred only to find that it was too
large and the transfer failed.

(quote end)

And this may help as well:

<https://stackoverflow.com/questions/2934788/detecting-file-upload-size-on-the-client-side>

<https://stackoverflow.com/questions/6327965/html-upload-max-file-size-does-not-appear-to-work>


-- 
Arno Welzel
https://arnowelzel.de

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-14 12:44 -0800
  Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Luuk <luuk@invalid.lan> - 2018-12-14 22:02 +0100
    Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-14 13:45 -0800
      Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2018-12-14 17:07 -0500
      Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Luuk <luuk@invalid.lan> - 2018-12-15 11:15 +0100
        Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-15 05:50 -0800
          Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Luuk <luuk@invalid.lan> - 2018-12-15 16:03 +0100
            Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-15 09:42 -0800
              Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Luuk <luuk@invalid.lan> - 2018-12-15 20:01 +0100
            Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Arno Welzel <usenet@arnowelzel.de> - 2018-12-16 02:11 +0100
              Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Luuk <luuk@invalid.lan> - 2018-12-16 14:22 +0100
                Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-16 11:05 -0800
              Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-16 11:02 -0800
              Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-12-16 23:30 +0100
                Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-16 15:15 -0800
              Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-17 07:01 -0800
                Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2019-01-29 07:06 -0800
                Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo bill <william@TechServSys.com> - 2019-01-30 06:43 -0500
  Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Dan Campbell <dcwhatthe@gmail.com> - 2018-12-14 13:42 -0800
    Re: Cannot retrieve error related to a specific file upload, in a 3-part input file blo Jerry Stuckle <jstucklex@attglobal.net> - 2018-12-16 12:45 -0500

csiph-web