Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Help please <cfloop issue

Posted on 2014-02-21
8
177 Views
Last Modified: 2014-02-26
Hi,

How can I pass my counter thru this loop.
the files name that I have are:
file_1
file_2
file_3

 <cfset maxFiles = 3>
 
 <cfloop from="1" to="#maxFiles#" index="counter">
 
  <cfdump var="#Form.file_#counter#">

 </cfloop>
0
Comment
Question by:lulu50
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39877700
You can use brackets:

#form["file_" & counter]#
0
 

Author Comment

by:lulu50
ID: 39878003
no I can't
0
 

Author Comment

by:lulu50
ID: 39878024
Error Occurred While Processing Request
File '' does not exist.

 value="#FileReadBinary(form["file_" & counter])#">


can't use double cote
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39878029
use single quote

value="#FileReadBinary(form['file_' & counter])#">
0
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39878033
Or the other way around:

value='#FileReadBinary(form["file_" & counter])#'>
0
 

Author Comment

by:lulu50
ID: 39886841
no I still have an error

The tag must be nested inside a cfquery tag.

I tried:

 <cfqueryparam cfsqltype="cf_sql_blob"
              value='#FileReadBinary(form["file_" & counter])#'>

and this

<cfqueryparam cfsqltype="cf_sql_blob"
              value="#FileReadBinary(form['file_' & counter])#">
0
 
LVL 4

Accepted Solution

by:
Rodrigo Munera earned 500 total points
ID: 39886909
You can't save files like that,
you must first upload the file to your server
https://wikidocs.adobe.com/wiki/pages/viewpage.action?pageId=87505342

and then you can use filereadbinary
https://wikidocs.adobe.com/wiki/display/coldfusionen/FileReadBinary
0
 

Author Closing Comment

by:lulu50
ID: 39888879
Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question