Batch upload of images. Please help!

Hi,

I don't know any php myself. Just html, css, etc. So I hired a
subcontractor to set up a batch upload of images for a site I'm making.
The word "batch" means to me that there isn't really any limit to the
number of files that can be uploaded (well, of course it has to be
practical and within reason and not e.g. a hundred images in one go, but
maybe 10 or 20 or even 30 if other circumstances are OK.)

He didn't mention anything about limits either. But now, when done, the
script can only upload 4 images at the time and he's claiming that
that's the limit for the http protocol. IMHO, I think that's a piece of
info that he ought to have told me beforehand as it's not "real batch"
at all - at least not in my book. So I have to find some other solution
somewhere.

The questions I have are:

1. Is that true about 4 file upload limit?

2. Are there some other way to solve this with php/MySQL that's not too
complicated?

3. I have found a seemingly nicely working java applet:
http://www.postlet.com/ Has anyone implemented this and can give some
comments or tips?

4. I'm not too happy to pay the guy for this, as I think he should have
told me from start, or at least at the point when he found out about the
limit. Am I overreacting here?

Your input is highly appreciated....

TIA
Danny
Danny Boy [ Sa, 21 April 2007 08:49 ] [ ID #1694368 ]

Re: Batch upload of images. Please help!

Danny Boy wrote:

> He didn't mention anything about limits either. But now, when done, the
> script can only upload 4 images at the time and he's claiming that
> that's the limit for the http protocol. IMHO, I think that's a piece of
> info that he ought to have told me beforehand as it's not "real batch"
> at all - at least not in my book. So I have to find some other solution
> somewhere.

The main limit is the following setting in php.ini: upload_max_filesize = 2M

It's not a limit on the amount of files you can select.

There is of course the limit how much memory the php script can use (you set
that in php.ini too), but the images are stored as files on the server and not
loaded into the php script, so this limit will not come in question in your case.


> The questions I have are:
>
> 1. Is that true about 4 file upload limit?

No, the limit is the size of the content you are uploading (in MBs).


> 2. Are there some other way to solve this with php/MySQL that's not too
> complicated?

Depends on how the script you have is written, if it's done properly then you
can just add on new input fields where to select the images to be uploaded.

If the script is badly written, then it may be better just go to freshmeat.net
and search for a good opensource project that does what you need.


> 4. I'm not too happy to pay the guy for this, as I think he should have
> told me from start, or at least at the point when he found out about the
> limit. Am I overreacting here?

Much depends on the contract you wrote, IMHO he didn't deliver the application
you had bought, so I wouldn't really think you are obligated to pay for it
until he delivers you the application you asked for and of course depending on
the fine print of the contract you may not even have to pay the full sum as he
didn't deliver it in time.


--

//Aho
Shion [ Sa, 21 April 2007 09:08 ] [ ID #1694369 ]

Re: Batch upload of images. Please help!

J.O. Aho wrote:

> Danny Boy wrote:
>
>
>>He didn't mention anything about limits either. But now, when done, the
>>script can only upload 4 images at the time and he's claiming that
>>that's the limit for the http protocol. IMHO, I think that's a piece of
>>info that he ought to have told me beforehand as it's not "real batch"
>>at all - at least not in my book. So I have to find some other solution
>>somewhere.
>
>
> The main limit is the following setting in php.ini: upload_max_filesize = 2M
>
> It's not a limit on the amount of files you can select.
>
> There is of course the limit how much memory the php script can use (you set
> that in php.ini too), but the images are stored as files on the server and not
> loaded into the php script, so this limit will not come in question in your case.
>
>
>
>>The questions I have are:
>>
>>1. Is that true about 4 file upload limit?
>
>
> No, the limit is the size of the content you are uploading (in MBs).
>
>
>
>>2. Are there some other way to solve this with php/MySQL that's not too
>>complicated?
>
>
> Depends on how the script you have is written, if it's done properly then you
> can just add on new input fields where to select the images to be uploaded.
>
> If the script is badly written, then it may be better just go to freshmeat.net
> and search for a good opensource project that does what you need.
>
>
>
>>4. I'm not too happy to pay the guy for this, as I think he should have
>>told me from start, or at least at the point when he found out about the
>>limit. Am I overreacting here?
>
>
> Much depends on the contract you wrote, IMHO he didn't deliver the application
> you had bought, so I wouldn't really think you are obligated to pay for it
> until he delivers you the application you asked for and of course depending on
> the fine print of the contract you may not even have to pay the full sum as he
> didn't deliver it in time.
>
>

A million thanks for fast feedback, Aho!

Maybe I need to add a few things: What I had in mind (but didn't
explicitly tell him) was that I preferred a way to select several files
from the hard drive at once and upload. His solution is four independent
upload "slots" on the page, each one only able to get one file. Maybe
that is browser dependant? Or is my idea doable?

Also: The contract says "batch" and doesn't say any number at all. I
perhaps would have accepted if he had told me from the start (or when he
found out). I just don't like being presented this finished solution as
a matter of fact, like "here's what you get. Be happy". In particular
now if what you're saying is correct; that it's not the number of files
that's important, but the aggregated file size of them.

And about the file size; OK, I understand this can be altered at will. I
can also change the actual server settings to accept just about any
uploasd size. Presently it's set to 10MB.

Again, thanks a bunch for input. Much appreciated! If you have anything
to add, please do.

Cheers,
Danny
Danny Boy [ Sa, 21 April 2007 09:42 ] [ ID #1694370 ]

Re: Batch upload of images. Please help!

Danny Boy wrote:

> Maybe I need to add a few things: What I had in mind (but didn't
> explicitly tell him) was that I preferred a way to select several files
> from the hard drive at once and upload. His solution is four independent
> upload "slots" on the page, each one only able to get one file. Maybe
> that is browser dependant? Or is my idea doable?

No, it's not limited to use one file per file-input-field, a quick search on
google.com did generate a file-input-field that handled 3 files (not too much
work to adopt this for more files).

It's quite important to write down on paper what you want, as this you can
then use in court if there is something you feel you didn't get.


> Also: The contract says "batch" and doesn't say any number at all. I
> perhaps would have accepted if he had told me from the start (or when he
> found out). I just don't like being presented this finished solution as
> a matter of fact, like "here's what you get. Be happy". In particular
> now if what you're saying is correct; that it's not the number of files
> that's important, but the aggregated file size of them.

Personally I would call 4 files for a batch, but taking that to court will
depend quite much on the judge and his knowledge about programming what he may
rule, but it feels for me that the guy you contracted took the easy way.


> And about the file size; OK, I understand this can be altered at will. I
> can also change the actual server settings to accept just about any
> uploasd size. Presently it's set to 10MB.

Yes, it can be alter, in the default php.ini, in the apache settings or in
..htaccess, so you can have different max upload sizes depending in which
directory the upload script is located.


I still suggest you take a look at freshmeat.net for a portal/cms that
supports patch uploads, they could give you a lot of features you haven't yet
thought about and you said you are good at css, then you won't have troubles
at all with making your own theme for the site and many portals/cms do use
modules, which makes it easy to add new features. Of course if you already
have a lot of quite special tools, then it can be difficult to move to
something new.

--

//Aho
Shion [ Sa, 21 April 2007 10:02 ] [ ID #1694371 ]

Re: Batch upload of images. Please help!

Message-ID: <58ttjqF2hvpiqU2 [at] mid.individual.net> from Danny Boy
contained the following:

>Maybe I need to add a few things: What I had in mind (but didn't
>explicitly tell him) was that I preferred a way to select several files
>from the hard drive at once and upload. His solution is four independent
>upload "slots" on the page, each one only able to get one file. Maybe
>that is browser dependant? Or is my idea doable?

That /is/ a limitation of html. Look at any online file management
tool.
>
>Also: The contract says "batch" and doesn't say any number at all. I
>perhaps would have accepted if he had told me from the start (or when he
>found out).

Arguably 4 is a batch. And given the limitation of html he could hardly
put an unlimited number of file upload boxes.

>I just don't like being presented this finished solution as
>a matter of fact, like "here's what you get. Be happy". In particular
>now if what you're saying is correct; that it's not the number of files
>that's important, but the aggregated file size of them.

There is no excuse fore this attitude but I think you are on shaky
ground if you refuse to pay. It would be better to keep a good working
relationship and reach a compromise solution or, if it's never going to
be what you want, chalk it up to experience and try another approach.
But this time say /exactly/ what you want.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Geoff Berrow [ Sa, 21 April 2007 10:23 ] [ ID #1694372 ]

Re: Batch upload of images. Please help!

Geoff Berrow wrote:

Hi Geoff, and thanks for input! See comments below, please.....

> That /is/ a limitation of html. Look at any online file management
> tool.

To confirm: One file per upload slot is html limitation? That's fine
(even if the java applet gadget at http://www.postlet.com/ looks more
and more promising).

> Arguably 4 is a batch. And given the limitation of html he could hardly
> put an unlimited number of file upload boxes.

Maybe my language limitation (English isn't my mother tongue): Do you
mean that 4 is a batch or not? IMHO, 4 is a batch if you chose to upload
4. But to me, "batch" means that you - in theory - can upload unlimited
number of files simultaneously. At least, a "batch" doesn't have a cap,
and if it has, it's certainly not as low as four.

As for unlimited upload boxes: Of course there cannot be *unlimited* -
due practical reasons. But in theory it could, right? And if I keep them
small, why not 10 or 12. I just don't enjoy the situation he's putting
me in by feeding me incorrect info and a "fait accompli" nonsense about
"http not allowing more than 4 uploads".

> There is no excuse fore this attitude but I think you are on shaky
> ground if you refuse to pay. It would be better to keep a good working
> relationship and reach a compromise solution or, if it's never going to
> be what you want, chalk it up to experience and try another approach.
> But this time say /exactly/ what you want.

This is the first job I have sent his way, and likely the last too. I
cannot compromise as I have my client to account for. He has asked for
"batch" and will not settle for a compromise since it's just not what
the client wants.

Well, I'll deal with it. Thanks again for input. Very, very appreciated!
Danny
Danny Boy [ Sa, 21 April 2007 11:00 ] [ ID #1694373 ]

Re: Batch upload of images. Please help!

Hi Aho,

Thanks for more.

> No, it's not limited to use one file per file-input-field, a quick search on
> google.com did generate a file-input-field that handled 3 files (not too much
> work to adopt this for more files).

Yes, I did that and mailed him 3-4 promising URLs and suggested that he
might at least take a look at them. I also suggested this java applet
(which, as I understand, isn't very hard to implement). Regretfully, he
replied with some attitude and just refused.

>
> It's quite important to write down on paper what you want, as this you can
> then use in court if there is something you feel you didn't get.

> Personally I would call 4 files for a batch, but taking that to court will
> depend quite much on the judge and his knowledge about programming what he may
> rule, but it feels for me that the guy you contracted took the easy way.

Nah... this is a very small job and just a few $$. No court, no lawyers
or anything like that.

> I still suggest you take a look at freshmeat.net for a portal/cms that
> supports patch uploads, they could give you a lot of features you haven't yet
> thought about and you said you are good at css, then you won't have troubles
> at all with making your own theme for the site and many portals/cms do use
> modules, which makes it easy to add new features. Of course if you already
> have a lot of quite special tools, then it can be difficult to move to
> something new.

I took a look there (thanks for suggestion) and have bookmarked for the
future.

Cheers,
Danny
Danny Boy [ Sa, 21 April 2007 11:09 ] [ ID #1694374 ]
PHP » alt.php » Batch upload of images. Please help!

Vorheriges Thema: link exchange scrypt ?
Nächstes Thema: PEAR::HTML_BBCodeParser Parser Issue