?
Solved

Help please <cfloop issue

Posted on 2014-02-21
8
Medium Priority
?
180 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
[X]
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
  • 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
Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

 
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 2000 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

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 …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

771 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