RE: Uploading X number of photos at one time?

2006-08-28 Thread Andy Matthews
Right...

When I said original size, I simply meant the image he's going to upload.
He's knows a decent amount about photography so I'll just make sure he runs
a Photoshop action on the images to reduce them to say 1000 or less before
upload.

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 2:52 PM
To: CF-Talk
Subject: Re: Uploading X number of photos at one time?


Andy Matthews wrote:
 I'm building an admin section for a client to manage inventory of his
 products. The products are higher-end so he'd like to have up to 10 photos
 for each item. I will need to create multiple sizes of each picture using
 Rick Root's Image.cfc.

 What might be the best way to work with anywhere from 1 to 10 images
 uploaded at once? Would it be better to use some other sort of interface?

 My thought would be to create a single upload field, then loop over it 10
 times. Then perform the same on the upload portion of the page. The only
 problem I can see with that is that he'd also like to keep the original
 image as the largest size. That means that there could potentially be
 anywhere from 3 or 4 megs to 10 megs uploaded at once.

 What are your thoughts on this?


I've done this a few different ways, and it works best different ways
for different clients, depending on how they manage their
inventory...but I'll throw out a few ideas...

-FTP the photos into a temp directory, and then present them with an
admin page that shows thumbnails and allows them to assign them to a
piece of inventory
-If they have inventory or some kind of reference numbers already
assigned, it may be easier for them to just use a naming convention with
the images on their local machine, FTP them up, and them batch import them.
-I've tried to shy away from uploading more than about 5 photos at a
time through HTTP, especially if you are going to be doing the resizing
in the same process...most of the time with something like this, I've
given them an interface to review their photos with the ability to
upload a single photo at a time...when it is uploaded it refreshes
showing the thumbnail of the newly uploaded photo along with the other
photos associated with the record.  The feedback they get from this
process seems to work better than having them wait for a unknown amount
of time when uploading multiple photos.
-And although the client wants the original size, I would try to work
out with him a large size to output.  If he's uploading some 2000+
pixel wide photo, it probably doesn't do much good to have that as the
largest photo...you probably want it limited to something like 600 or
800 pixels wide.  Even if he really does want the original, I would
still resize it just to apply some compression.



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251230
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Uploading X number of photos at one time?

2006-08-28 Thread Larry Lyons
I'm building an admin section for a client to manage inventory of his
products. The products are higher-end so he'd like to have up to 10 photos
for each item. I will need to create multiple sizes of each picture using
Rick Root's Image.cfc.

What might be the best way to work with anywhere from 1 to 10 images
uploaded at once? Would it be better to use some other sort of interface?

My thought would be to create a single upload field, then loop over it 10
times. Then perform the same on the upload portion of the page. The only
problem I can see with that is that he'd also like to keep the original
image as the largest size. That means that there could potentially be
anywhere from 3 or 4 megs to 10 megs uploaded at once.

What are your thoughts on this?

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

Andy,

For a front end you may want to check out this blog posting. Its a fairly slick 
multiple file uploader.
http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element

An updated version is also available:
http://the-stickman.com/web-development/javascript/updated-upload-multiple-files-with-a-single-file-element/

hth,

larry

--
Larry C. Lyons
Web Analyst
BEI Resources
American Type Culture Collection
http://www.beiresources.org
email: llyons(at)atcc(dot)org
tel: 703.365.2700.2678
--

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251254
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Uploading X number of photos at one time?

2006-08-28 Thread Aaron Rouse
What you have pasted is similar to the methods I have taken in the past for
this.  One could however use something like DWRUtil that comes with ajaxCFC,
here is a quick example I made via one of his online ones.  I did not test
it out extensively, was just trying to throw out an option that I had been
thinking of using the next time I have a similar need.


head
 titleexample/title


  script type='text/javascript'_ajaxConfig =
{'_jsscriptFolder':'JS/ajaxCFC'};/script
  script type='text/javascript' src='JS/ajaxCFC/ajax.js'/script
  script type=text/javascript

 var cellFuncs = [
  function(data) { return 'label for=document_' + counter + 'Document
span class=Error*/span:/label' },
  function(data) { return 'input type=file name=document_' + counter +
' value= size=30 /' }
 ];

 var counter = 1;

 function getTableRow() {
  DWRUtil.addRows(tableBody, [''], cellFuncs);
  counter++
 }
/script
/head

fieldset
legendexample using DWRUtil.addRows/legend
input type=button value=Test onClick=getTableRow(); /br /
table
 tbody id=tableBody/tbody

/table
/fieldset


On 8/25/06, Bobby Hartsfield [EMAIL PROTECTED] wrote:

 Paste all of this in a .html file and run it. Click the [Add another Image
 Uploader] link to add more fields. I would of course limit this to a
 maximum
 number of images at once. (way less than 10) To upload multiple images at
 one time without worrying about timeouts youll have to look into something
 like ActiveX controls





~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251255
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Uploading X number of photos at one time?

2006-08-28 Thread Andy Matthews
Sorry that I didn't respond to this post. Is it possible to limit the amount
of upload fields the user can add?

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 9:24 PM
To: CF-Talk
Subject: RE: Uploading X number of photos at one time?


Paste all of this in a .html file and run it. Click the [Add another Image
Uploader] link to add more fields. I would of course limit this to a maximum
number of images at once. (way less than 10) To upload multiple images at
one time without worrying about timeouts youll have to look into something
like ActiveX controls


script
function addFieldSet()
{

//Increment the field counter
thisInc = Number(document.imgform.fldCount.value) + 1;
document.imgform.fldCount.value = thisInc;

//Build the div container
divCont = document.createElement('DIV');
divCont.id = 'img' + thisInc;
divCont.style.background='ececec';
divCont.style.borderStyle = 'solid';
divCont.style.borderWidth = '1px';
divCont.style.borderColor = '00';


//Build the table element
thisTable = document.createElement('TABLE');
thisTable.border = '0';
thisTable.cellPadding = '5';
thisTable.cellSpacing = '0';
thisTable.width = '100%';


//Build the first row of the table
Row1 = document.createElement('TR');
//Build column 1 of the first row
Row1Col1 = document.createElement('TD');
Row1Col1.innerHTML = 'Image File:';

//Buld column 2 of row 1
Row1Col2 = document.createElement('TD');

//Build the file field
fileFld = document.createElement('INPUT');
fileFld.type = 'file';
fileFld.name = 'imagefile' + thisInc;
fileFld.size = '40';

//Build a span tag to hold some text and a line break just
after the file field
thisSpan1 = document.createElement('SPAN');
thisSpan1.innerHTML = 'brvalid formats: jpg, jpeg, pjpeg,
gif';

//Put the file field and text in the column
Row1Col2.appendChild(fileFld);
Row1Col2.appendChild(thisSpan1);

//Go ahead and put the first row all together.
Row1.appendChild(Row1Col1);
Row1.appendChild(Row1Col2);


//Build the second row
Row2 = document.createElement('TR');

//Build the columns just as before but (of course) with
different text and a textarea field
Row2Col1 = document.createElement('TD');
Row2Col1.vAlign = 'top';
Row2Col1.innerHTML = 'Cutline:';

//Build column 2 of row 2
Row2Col2 = document.createElement('TD');
Row2Col2.vAlign = 'top';

//build the text area
txtArea = document.createElement('TEXTAREA');
txtArea.name = 'cutline' + thisInc;
txtArea.cols = '40';
txtArea.rows = '2';

//Add the textarea to column 2 of row 2
Row2Col2.appendChild(txtArea);

//Add the columns to the row
Row2.appendChild(Row2Col1);
Row2.appendChild(Row2Col2);

//Create t tbody to hold the table content
thisTbody = document.createElement('TBODY');

//Add the rows to the table
thisTbody.appendChild(Row1);
thisTbody.appendChild(Row2);

//Add the TBODY to the table
thisTable.appendChild(thisTbody);

//Now add the table to the div
divCont.appendChild(thisTable)

//Finally, add the div to the main div container

document.getElementById('FormFieldContainer').appendChild(divCont);

//And add a line break after the div

document.getElementById('FormFieldContainer').appendChild(document.createEle
ment('BR'));
}

/script




form name=imgform action=index.cfm?action=upimgsimgid=0 method=post
enctype=multipart/form-data style=display:inline; 
input type=hidden name=fldCount value=1 /
div id=FormFieldContainer

div align=righta href=javascript:void(0);
onClick=addFieldSet();return false;[Add Another Image Uploader]/a/div
br
br

div id=img1 style=background:#ececec;border:1px solid #00;
table border=0 cellpadding=5 cellspacing=0
width=100%
tr

Re: Uploading X number of photos at one time?

2006-08-28 Thread Aaron Rouse
You could reference his field counter and once it is to a certain number
then disable the link that adds more rows.

On 8/28/06, Andy Matthews [EMAIL PROTECTED] wrote:

 Sorry that I didn't respond to this post. Is it possible to limit the
 amount
 of upload fields the user can add?

 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-

 -Original Message-
 From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 25, 2006 9:24 PM
 To: CF-Talk
 Subject: RE: Uploading X number of photos at one time?


 Paste all of this in a .html file and run it. Click the [Add another Image
 Uploader] link to add more fields. I would of course limit this to a
 maximum
 number of images at once. (way less than 10) To upload multiple images at
 one time without worrying about timeouts youll have to look into something
 like ActiveX controls


 script
 function addFieldSet()
 {

//Increment the field counter
thisInc = Number(document.imgform.fldCount.value) + 1;
document.imgform.fldCount.value = thisInc;

//Build the div container
divCont = document.createElement('DIV');
divCont.id = 'img' + thisInc;
divCont.style.background='ececec';
divCont.style.borderStyle = 'solid';
divCont.style.borderWidth = '1px';
divCont.style.borderColor = '00';


//Build the table element
thisTable = document.createElement('TABLE');
thisTable.border = '0';
thisTable.cellPadding = '5';
thisTable.cellSpacing = '0';
thisTable.width = '100%';


//Build the first row of the table
Row1 = document.createElement('TR');
//Build column 1 of the first row
Row1Col1 = document.createElement('TD');
Row1Col1.innerHTML = 'Image File:';

//Buld column 2 of row 1
Row1Col2 = document.createElement('TD');

//Build the file field
fileFld = document.createElement('INPUT');
fileFld.type = 'file';
fileFld.name = 'imagefile' + thisInc;
fileFld.size = '40';

//Build a span tag to hold some text and a line break just
 after the file field
thisSpan1 = document.createElement('SPAN');
thisSpan1.innerHTML = 'brvalid formats: jpg, jpeg, pjpeg,
 gif';

//Put the file field and text in the column
Row1Col2.appendChild(fileFld);
Row1Col2.appendChild(thisSpan1);

//Go ahead and put the first row all together.
Row1.appendChild(Row1Col1);
Row1.appendChild(Row1Col2);


//Build the second row
Row2 = document.createElement('TR');

//Build the columns just as before but (of course) with
 different text and a textarea field
Row2Col1 = document.createElement('TD');
Row2Col1.vAlign = 'top';
Row2Col1.innerHTML = 'Cutline:';

//Build column 2 of row 2
Row2Col2 = document.createElement('TD');
Row2Col2.vAlign = 'top';

//build the text area
txtArea = document.createElement('TEXTAREA');
txtArea.name = 'cutline' + thisInc;
txtArea.cols = '40';
txtArea.rows = '2';

//Add the textarea to column 2 of row 2
Row2Col2.appendChild(txtArea);

//Add the columns to the row
Row2.appendChild(Row2Col1);
Row2.appendChild(Row2Col2);

//Create t tbody to hold the table content
thisTbody = document.createElement('TBODY');

//Add the rows to the table
thisTbody.appendChild(Row1);
thisTbody.appendChild(Row2);

//Add the TBODY to the table
thisTable.appendChild(thisTbody);

//Now add the table to the div
divCont.appendChild(thisTable)

//Finally, add the div to the main div container

 document.getElementById('FormFieldContainer').appendChild(divCont);

//And add a line break after the div

 document.getElementById('FormFieldContainer').appendChild(
 document.createEle
 ment('BR'));
}

 /script




 form name=imgform action=index.cfm?action=upimgsimgid=0
 method=post
 enctype=multipart/form-data style=display:inline; 
 input type=hidden name=fldCount value=1 /
 div id=FormFieldContainer

div align=righta href=javascript:void(0);
 onClick=addFieldSet();return false;[Add Another Image
 Uploader]/a/div

RE: Uploading X number of photos at one time?

2006-08-28 Thread Ray Champagne
Andy, check out that blog link someone threw in this AM.  You can limit it
using that script without any modifications.  

While I like this solution, I think the one posted earlier is much slicker.
Is slicker a word?  

Anyways, check it out before you try modifying this one to do what you need.

Ray

 -Original Message-
 From: Andy Matthews [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 28, 2006 11:53 AM
 To: CF-Talk
 Subject: RE: Uploading X number of photos at one time?
 
 Sorry that I didn't respond to this post. Is it possible to limit the
amount
 of upload fields the user can add?
 
 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 -Original Message-
 From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 25, 2006 9:24 PM
 To: CF-Talk
 Subject: RE: Uploading X number of photos at one time?
 
 
 Paste all of this in a .html file and run it. Click the [Add another Image
 Uploader] link to add more fields. I would of course limit this to a
maximum
 number of images at once. (way less than 10) To upload multiple images at
 one time without worrying about timeouts youll have to look into something
 like ActiveX controls
 
 
 script
 function addFieldSet()
 {
 
   //Increment the field counter
   thisInc = Number(document.imgform.fldCount.value) + 1;
   document.imgform.fldCount.value = thisInc;
 
   //Build the div container
   divCont = document.createElement('DIV');
   divCont.id = 'img' + thisInc;
   divCont.style.background='ececec';
   divCont.style.borderStyle = 'solid';
   divCont.style.borderWidth = '1px';
   divCont.style.borderColor = '00';
 
 
   //Build the table element
   thisTable = document.createElement('TABLE');
   thisTable.border = '0';
   thisTable.cellPadding = '5';
   thisTable.cellSpacing = '0';
   thisTable.width = '100%';
 
 
   //Build the first row of the table
   Row1 = document.createElement('TR');
   //Build column 1 of the first row
   Row1Col1 = document.createElement('TD');
   Row1Col1.innerHTML = 'Image File:';
 
   //Buld column 2 of row 1
   Row1Col2 = document.createElement('TD');
 
   //Build the file field
   fileFld = document.createElement('INPUT');
   fileFld.type = 'file';
   fileFld.name = 'imagefile' + thisInc;
   fileFld.size = '40';
 
   //Build a span tag to hold some text and a line break just
 after the file field
   thisSpan1 = document.createElement('SPAN');
   thisSpan1.innerHTML = 'brvalid formats: jpg, jpeg, pjpeg,
 gif';
 
   //Put the file field and text in the column
   Row1Col2.appendChild(fileFld);
   Row1Col2.appendChild(thisSpan1);
 
   //Go ahead and put the first row all together.
   Row1.appendChild(Row1Col1);
   Row1.appendChild(Row1Col2);
 
 
   //Build the second row
   Row2 = document.createElement('TR');
 
   //Build the columns just as before but (of course) with
 different text and a textarea field
   Row2Col1 = document.createElement('TD');
   Row2Col1.vAlign = 'top';
   Row2Col1.innerHTML = 'Cutline:';
 
   //Build column 2 of row 2
   Row2Col2 = document.createElement('TD');
   Row2Col2.vAlign = 'top';
 
   //build the text area
   txtArea = document.createElement('TEXTAREA');
   txtArea.name = 'cutline' + thisInc;
   txtArea.cols = '40';
   txtArea.rows = '2';
 
   //Add the textarea to column 2 of row 2
   Row2Col2.appendChild(txtArea);
 
   //Add the columns to the row
   Row2.appendChild(Row2Col1);
   Row2.appendChild(Row2Col2);
 
   //Create t tbody to hold the table content
   thisTbody = document.createElement('TBODY');
 
   //Add the rows to the table
   thisTbody.appendChild(Row1);
   thisTbody.appendChild(Row2);
 
   //Add the TBODY to the table
   thisTable.appendChild(thisTbody);
 
   //Now add the table to the div
   divCont.appendChild(thisTable)
 
   //Finally, add the div to the main div container
 
 document.getElementById('FormFieldContainer').appendChild(divCont);
 
   //And add a line break after the div
 

document.getElementById('FormFieldContainer').appendChild(document.createEl
 e
 ment('BR'));
   }
 
 /script
 
 
 
 
 form name=imgform action

RE: Uploading X number of photos at one time?

2006-08-28 Thread Bobby Hartsfield
Yeah, just set a maxUploads variable to the number you want and wrap
everything inside the function in an if statement. Something like...


var maxUploads = 3;

if (document.imgform.fldCount.value == maxUploads)
{
 alert('already at the max number');
}
else
{
//ALL THE REST OF THE CODE HERE

}

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

 

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 11:53 AM
To: CF-Talk
Subject: RE: Uploading X number of photos at one time?

Sorry that I didn't respond to this post. Is it possible to limit the amount
of upload fields the user can add?

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 9:24 PM
To: CF-Talk
Subject: RE: Uploading X number of photos at one time?


Paste all of this in a .html file and run it. Click the [Add another Image
Uploader] link to add more fields. I would of course limit this to a maximum
number of images at once. (way less than 10) To upload multiple images at
one time without worrying about timeouts youll have to look into something
like ActiveX controls


script
function addFieldSet()
{

//Increment the field counter
thisInc = Number(document.imgform.fldCount.value) + 1;
document.imgform.fldCount.value = thisInc;

//Build the div container
divCont = document.createElement('DIV');
divCont.id = 'img' + thisInc;
divCont.style.background='ececec';
divCont.style.borderStyle = 'solid';
divCont.style.borderWidth = '1px';
divCont.style.borderColor = '00';


//Build the table element
thisTable = document.createElement('TABLE');
thisTable.border = '0';
thisTable.cellPadding = '5';
thisTable.cellSpacing = '0';
thisTable.width = '100%';


//Build the first row of the table
Row1 = document.createElement('TR');
//Build column 1 of the first row
Row1Col1 = document.createElement('TD');
Row1Col1.innerHTML = 'Image File:';

//Buld column 2 of row 1
Row1Col2 = document.createElement('TD');

//Build the file field
fileFld = document.createElement('INPUT');
fileFld.type = 'file';
fileFld.name = 'imagefile' + thisInc;
fileFld.size = '40';

//Build a span tag to hold some text and a line break just
after the file field
thisSpan1 = document.createElement('SPAN');
thisSpan1.innerHTML = 'brvalid formats: jpg, jpeg, pjpeg,
gif';

//Put the file field and text in the column
Row1Col2.appendChild(fileFld);
Row1Col2.appendChild(thisSpan1);

//Go ahead and put the first row all together.
Row1.appendChild(Row1Col1);
Row1.appendChild(Row1Col2);


//Build the second row
Row2 = document.createElement('TR');

//Build the columns just as before but (of course) with
different text and a textarea field
Row2Col1 = document.createElement('TD');
Row2Col1.vAlign = 'top';
Row2Col1.innerHTML = 'Cutline:';

//Build column 2 of row 2
Row2Col2 = document.createElement('TD');
Row2Col2.vAlign = 'top';

//build the text area
txtArea = document.createElement('TEXTAREA');
txtArea.name = 'cutline' + thisInc;
txtArea.cols = '40';
txtArea.rows = '2';

//Add the textarea to column 2 of row 2
Row2Col2.appendChild(txtArea);

//Add the columns to the row
Row2.appendChild(Row2Col1);
Row2.appendChild(Row2Col2);

//Create t tbody to hold the table content
thisTbody = document.createElement('TBODY');

//Add the rows to the table
thisTbody.appendChild(Row1);
thisTbody.appendChild(Row2);

//Add the TBODY to the table
thisTable.appendChild(thisTbody);

//Now add the table to the div
divCont.appendChild(thisTable)

//Finally, add the div to the main div container

document.getElementById('FormFieldContainer').appendChild(divCont);

//And add a line break after the div

document.getElementById('FormFieldContainer').appendChild(document.createEle
ment

Re: Uploading X number of photos at one time?

2006-08-26 Thread Robertson-Ravo, Neil (RX)
Or use the Flash 8 multiple upload capability - very nifty.









This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions. 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Bobby Hartsfield
To: CF-Talk
Sent: Sat Aug 26 03:23:54 2006
Subject: RE: Uploading X number of photos at one time?

Paste all of this in a .html file and run it. Click the [Add another Image
Uploader] link to add more fields. I would of course limit this to a maximum
number of images at once. (way less than 10) To upload multiple images at
one time without worrying about timeouts youll have to look into something
like ActiveX controls


script
function addFieldSet()
{

//Increment the field counter
thisInc = Number(document.imgform.fldCount.value) + 1;
document.imgform.fldCount.value = thisInc;

//Build the div container
divCont = document.createElement('DIV');
divCont.id = 'img' + thisInc;
divCont.style.background='ececec';
divCont.style.borderStyle = 'solid';
divCont.style.borderWidth = '1px';
divCont.style.borderColor = '00';


//Build the table element
thisTable = document.createElement('TABLE');
thisTable.border = '0';
thisTable.cellPadding = '5';
thisTable.cellSpacing = '0';
thisTable.width = '100%';


//Build the first row of the table
Row1 = document.createElement('TR');
//Build column 1 of the first row
Row1Col1 = document.createElement('TD');
Row1Col1.innerHTML = 'Image File:';

//Buld column 2 of row 1
Row1Col2 = document.createElement('TD');

//Build the file field
fileFld = document.createElement('INPUT');
fileFld.type = 'file';
fileFld.name = 'imagefile' + thisInc;
fileFld.size = '40';

//Build a span tag to hold some text and a line break just
after the file field
thisSpan1 = document.createElement('SPAN');
thisSpan1.innerHTML = 'brvalid formats: jpg, jpeg, pjpeg,
gif';

//Put the file field and text in the column
Row1Col2.appendChild(fileFld);
Row1Col2.appendChild(thisSpan1);

//Go ahead and put the first row all together.
Row1.appendChild(Row1Col1);
Row1.appendChild(Row1Col2);


//Build the second row
Row2 = document.createElement('TR');

//Build the columns just as before but (of course) with
different text and a textarea field
Row2Col1 = document.createElement('TD');
Row2Col1.vAlign = 'top';
Row2Col1.innerHTML = 'Cutline:';

//Build column 2 of row 2
Row2Col2 = document.createElement('TD');
Row2Col2.vAlign = 'top';

//build the text area
txtArea = document.createElement('TEXTAREA');
txtArea.name = 'cutline' + thisInc;
txtArea.cols = '40';
txtArea.rows = '2';

//Add the textarea to column 2 of row 2
Row2Col2.appendChild(txtArea);

//Add the columns to the row
Row2.appendChild(Row2Col1);
Row2.appendChild(Row2Col2);

//Create t tbody to hold the table content
thisTbody = document.createElement('TBODY');

//Add the rows to the table
thisTbody.appendChild(Row1);
thisTbody.appendChild(Row2);

//Add the TBODY to the table
thisTable.appendChild(thisTbody);

//Now add the table to the div
divCont.appendChild(thisTable)

//Finally, add the div to the main div container

document.getElementById('FormFieldContainer').appendChild(divCont);

//And add a line break after the div

document.getElementById('FormFieldContainer').appendChild(document.createEle

RE: Uploading X number of photos at one time?

2006-08-26 Thread Bobby Hartsfield
You still have to worry about timeouts with flash forms, yes?

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006
 



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251130
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Uploading X number of photos at one time?

2006-08-26 Thread Crow T. Robot
Thanks, Bobby, that is pretty slick.  I appreciate it.

And Neil, while I really like the various features of Flash 8, you still
have to worry about your users who don't have the newest version of Flash.
This has always been my beef with Flash forms/features.





On 8/26/06, Bobby Hartsfield [EMAIL PROTECTED] wrote:

 You still have to worry about timeouts with flash forms, yes?

 ..:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006




 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251131
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Uploading X number of photos at one time?

2006-08-26 Thread Robertson-Ravo, Neil (RX)
Indeed, I am not a fan of Flash full stop but the multiple file upload is
slick. I am not a fan of the multiple file box html method.





This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions. 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Crow T. Robot
To: CF-Talk
Sent: Sat Aug 26 14:26:51 2006
Subject: Re: Uploading X number of photos at one time?

Thanks, Bobby, that is pretty slick.  I appreciate it.

And Neil, while I really like the various features of Flash 8, you still
have to worry about your users who don't have the newest version of Flash.
This has always been my beef with Flash forms/features.





On 8/26/06, Bobby Hartsfield [EMAIL PROTECTED] wrote:

 You still have to worry about timeouts with flash forms, yes?

 ..:.:.:.:.:.:.:.:.:.:.:.:.
 Bobby Hartsfield
 http://acoderslife.com



 --
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.405 / Virus Database: 268.11.6/428 - Release Date: 8/25/2006




 



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251132
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Uploading X number of photos at one time?

2006-08-25 Thread Ray Champagne
Wish I had known that todayI am in the middle of building a very similar
feature.

If it ain't too much trouble, could you sent it to ray [at] cvwp [dot] com ?
I'd like to see if I can't use it, cause I'm hating the way mine is coming
out

Thanks,

Ray

 -Original Message-
 From: Ian Skinner [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 25, 2006 2:49 PM
 To: CF-Talk
 Subject: RE: Uploading X number of photos at one time?
 
 What are your thoughts on this?
 
 
 Don’t have much to say about the load, but I do have some DHTML logic
that
 allows one to create a single form field (or set of them) and a link that
allows the
 user to add more as needed.  If you like, I can hunt down the example.
 
 
 --
 Ian Skinner
 Web Programmer
 BloodSource
 www.BloodSource.org
 Sacramento, CA
 
 -
 | 1 |   |
 -  Binary Soduko
 |   |   |
 -
 
 C code. C code run. Run code run. Please!
 - Cynthia Dunning
 
 Confidentiality Notice:  This message including any
 attachments is for the sole use of the intended
 recipient(s) and may contain confidential and privileged
 information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the
 intended recipient, please contact the sender and
 delete any copies of this message.
 
 
 
 
 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251064
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Uploading X number of photos at one time?

2006-08-25 Thread Jim Wright
Andy Matthews wrote:
 I'm building an admin section for a client to manage inventory of his
 products. The products are higher-end so he'd like to have up to 10 photos
 for each item. I will need to create multiple sizes of each picture using
 Rick Root's Image.cfc.
 
 What might be the best way to work with anywhere from 1 to 10 images
 uploaded at once? Would it be better to use some other sort of interface?
 
 My thought would be to create a single upload field, then loop over it 10
 times. Then perform the same on the upload portion of the page. The only
 problem I can see with that is that he'd also like to keep the original
 image as the largest size. That means that there could potentially be
 anywhere from 3 or 4 megs to 10 megs uploaded at once.
 
 What are your thoughts on this?
 

I've done this a few different ways, and it works best different ways 
for different clients, depending on how they manage their 
inventory...but I'll throw out a few ideas...

-FTP the photos into a temp directory, and then present them with an 
admin page that shows thumbnails and allows them to assign them to a 
piece of inventory
-If they have inventory or some kind of reference numbers already 
assigned, it may be easier for them to just use a naming convention with 
the images on their local machine, FTP them up, and them batch import them.
-I've tried to shy away from uploading more than about 5 photos at a 
time through HTTP, especially if you are going to be doing the resizing 
in the same process...most of the time with something like this, I've 
given them an interface to review their photos with the ability to 
upload a single photo at a time...when it is uploaded it refreshes 
showing the thumbnail of the newly uploaded photo along with the other 
photos associated with the record.  The feedback they get from this 
process seems to work better than having them wait for a unknown amount 
of time when uploading multiple photos.
-And although the client wants the original size, I would try to work 
out with him a large size to output.  If he's uploading some 2000+ 
pixel wide photo, it probably doesn't do much good to have that as the 
largest photo...you probably want it limited to something like 600 or 
800 pixels wide.  Even if he really does want the original, I would 
still resize it just to apply some compression.

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251067
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Uploading X number of photos at one time?

2006-08-25 Thread Casey Dougall
Something like this basically loop through your images and stuff after you
submit your form kinda like you would when you want to update multiple rows
in a database in the same time...  I chopped this out of a couple of scripts
but you'll get the idea.

!---FORM FIELDS---

cfform
cfloop index=i from=1 to=3
input type=file name=Filelimage#i# size=20
/cfloop
input type=hidden name=updates
/cfform

!---FORM ACTION PAGE---

cfif isdefined(updates)

cfloop index=i list=#updates#
!--- first check to see if they want to delete this row from table ---

cfif isdefined(Filelimage#i#) and len(evaluate(Fileimage#i#)) gt 2
cffile action=UPLOAD filefield=IMAGE destination=#TMPFolder#
nameconflict=MAKEUNIQUE accept=image/gif, image/jpeg, image/pjpeg,
image/png
cfset FileImage#i# = serverfile
/cfif


!---Do your Image stuff here now that you've uploaded it...---

cfset TheImage = imageCFC.scaleX(, #TMPFolder#\FileImage#i#,
#ImageFolder#\FileImage#i#.jpg, 200)

!---Then close your loop---

/cfloop


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251077
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Uploading X number of photos at one time?

2006-08-25 Thread Bobby Hartsfield
Paste all of this in a .html file and run it. Click the [Add another Image
Uploader] link to add more fields. I would of course limit this to a maximum
number of images at once. (way less than 10) To upload multiple images at
one time without worrying about timeouts youll have to look into something
like ActiveX controls


script
function addFieldSet()
{

//Increment the field counter
thisInc = Number(document.imgform.fldCount.value) + 1;
document.imgform.fldCount.value = thisInc;

//Build the div container
divCont = document.createElement('DIV');
divCont.id = 'img' + thisInc;
divCont.style.background='ececec';
divCont.style.borderStyle = 'solid';
divCont.style.borderWidth = '1px';
divCont.style.borderColor = '00';


//Build the table element
thisTable = document.createElement('TABLE');
thisTable.border = '0';
thisTable.cellPadding = '5';
thisTable.cellSpacing = '0';
thisTable.width = '100%';


//Build the first row of the table
Row1 = document.createElement('TR');
//Build column 1 of the first row
Row1Col1 = document.createElement('TD');
Row1Col1.innerHTML = 'Image File:';

//Buld column 2 of row 1
Row1Col2 = document.createElement('TD');

//Build the file field
fileFld = document.createElement('INPUT');
fileFld.type = 'file';
fileFld.name = 'imagefile' + thisInc;
fileFld.size = '40';

//Build a span tag to hold some text and a line break just
after the file field
thisSpan1 = document.createElement('SPAN');
thisSpan1.innerHTML = 'brvalid formats: jpg, jpeg, pjpeg,
gif';

//Put the file field and text in the column
Row1Col2.appendChild(fileFld);
Row1Col2.appendChild(thisSpan1);

//Go ahead and put the first row all together.
Row1.appendChild(Row1Col1);
Row1.appendChild(Row1Col2);


//Build the second row
Row2 = document.createElement('TR');

//Build the columns just as before but (of course) with
different text and a textarea field
Row2Col1 = document.createElement('TD');
Row2Col1.vAlign = 'top';
Row2Col1.innerHTML = 'Cutline:';

//Build column 2 of row 2
Row2Col2 = document.createElement('TD');
Row2Col2.vAlign = 'top';

//build the text area
txtArea = document.createElement('TEXTAREA');
txtArea.name = 'cutline' + thisInc;
txtArea.cols = '40';
txtArea.rows = '2';

//Add the textarea to column 2 of row 2
Row2Col2.appendChild(txtArea);

//Add the columns to the row
Row2.appendChild(Row2Col1);
Row2.appendChild(Row2Col2);

//Create t tbody to hold the table content
thisTbody = document.createElement('TBODY');

//Add the rows to the table
thisTbody.appendChild(Row1);
thisTbody.appendChild(Row2);

//Add the TBODY to the table
thisTable.appendChild(thisTbody);

//Now add the table to the div
divCont.appendChild(thisTable)

//Finally, add the div to the main div container

document.getElementById('FormFieldContainer').appendChild(divCont);

//And add a line break after the div

document.getElementById('FormFieldContainer').appendChild(document.createEle
ment('BR'));
}

/script




form name=imgform action=index.cfm?action=upimgsimgid=0 method=post
enctype=multipart/form-data style=display:inline; 
input type=hidden name=fldCount value=1 /
div id=FormFieldContainer

div align=righta href=javascript:void(0);
onClick=addFieldSet();return false;[Add Another Image Uploader]/a/div
br
br

div id=img1 style=background:#ececec;border:1px solid #00;
table border=0 cellpadding=5 cellspacing=0
width=100%
tr
tdImage File: /td

td
input type=file name=imagefile1
size=40br
valid formats: jpg, jpeg, pjpeg, gif
/td
/tr
tr
td valign=topCutline: /td
tdtextarea name=cutline1 cols=40
rows=2/textarea/td

   

Uploading X number of photos at one time?

2006-08-25 Thread Andy Matthews
I'm building an admin section for a client to manage inventory of his
products. The products are higher-end so he'd like to have up to 10 photos
for each item. I will need to create multiple sizes of each picture using
Rick Root's Image.cfc.

What might be the best way to work with anywhere from 1 to 10 images
uploaded at once? Would it be better to use some other sort of interface?

My thought would be to create a single upload field, then loop over it 10
times. Then perform the same on the upload portion of the page. The only
problem I can see with that is that he'd also like to keep the original
image as the largest size. That means that there could potentially be
anywhere from 3 or 4 megs to 10 megs uploaded at once.

What are your thoughts on this?

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251054
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Uploading X number of photos at one time?

2006-08-25 Thread Ian Skinner
What are your thoughts on this?


Don’t have much to say about the load, but I do have some DHTML logic that 
allows one to create a single form field (or set of them) and a link that 
allows the user to add more as needed.  If you like, I can hunt down the 
example.


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-
| 1 |   |
-  Binary Soduko
|   |   |
-
 
C code. C code run. Run code run. Please!
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251056
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4