Re: Re: A general UL script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 30 October 2006 06:08, Richard Lynch wrote:
> On Sat, October 28, 2006 4:06 pm, Børge Holen wrote:
> > I'm trying to validate wether or not to run the image check script.
> > however empty the file field(s) are This script is started... how do I
> > tell it
> > there is nothing here, go do other stuff.
> > for both multiupload forms and single upload forms since they're
> > supposed to
> > share this script. My logic tells me there should be something like
> > this if
> > statements, but then again, I'm more of a copy paster rather than a
> > expert.
>
> Read the documentation about what will and won't happen if the user
> does or doesn't fill in one or more FILE inputs:
> http://us3.php.net/manual/en/features.file-upload.php
>
> There is nothing at all tricky in this, really, if you read the docs...

Well... I've made one from that page, read all 'bout it.
See, the problem lies in the multifile uploader form;

* First it insert an empty file field (hidden).
* Second, I  rename all files to an md5 hash.
* Third, The md5 hash makes legal filenames witch enables my toolset to modify 
modify/validate my jpg.
* Forth and last moves them into my webtree.

The problem I seem to be getting at is this; How do I remove, lets say, file 
nr 3 of 6. The input fields can easily (because fields is removed and added 
dynamicly) be named everything from 'file_1' to 'file_20'. I only want jpg's
, so that gif in nr 3 has to be removed before the md5 hash rename. 

I could use splice_array to get at it just as I do with the first empty one, 
but then again, how do I count down the fields to get to the non valid file 
types.

I got some functions I found somewhere, that actually does this whole thing... 
except the md5, witch leads to some filename corruptions 'cus of the 
characters we have here in norway/sweden/denmark, the famous øæå.
It handles both the filename extension(if not containong æøå) and empty 
fields.
But I rather build something from ground up so I can learn it well, instead of 
using code I've not put together myself.

>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some starving artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?

-- 
---
Børge
Kennel Arivene 
http://www.arivene.net
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux