Re: more rules for quickform file upload?
| From: | Justin Patrin | Date: | Fri, 17 Dec 2004 22:28:34 +0000 |
| Subject: | Re: more rules for quickform file upload? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16294@lists.php.net to get a copy of this message | ||
On Fri, 17 Dec 2004 11:46:46 -0800 (PST), l Burnerheimerton
<lburnerheimerton@yahoo.com> wrote:
> From what I can see and find, for the fileupload in quickform has the following rules:
>
> - required field
> - certain file type
> - filesize
>
> Is there anyway to check if the filename already exists in the upload directory?
Files are stored on the filesystem with a temporary filename. If you
want to check to see if it's in some other upload dir, you're going to
have to do it manually. If you want it to be a QF rule, you can define
your own callback for this.
>
> What about returning the filename for linking use later in the script?
What do you mean by "linking use"? You can get the filename wherever
you want in $_FILES.
>
> Confirmation message that the file did upload?
Again, you could use your own callback for a QF rule and check to make
sure that the file uplaoded.
>
> Thanks for any ideas here!
>
--
Justin Patrin