• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Day 18

Quiz

1: True or false: When you create a form that enables users to upload a file, ColdFusion automatically creates a browse box to enable users to find files on their server.
A1: False. This box is created by the <FORM> parameter TYPE=FILE. Your upload forms don't need to use ColdFusion at all, but your ACTION pages do .
2: Name three attributes used with <CFFILE>'s upload ACTION.
A2: DESTINATION, FILEFIELD, and NAMECONFLICT. You might also use the optional attribute ACCEPT, which takes a comma-list of file types that will be accepted as input.
3: Where should your upload forms and ACTION pages reside on your server? (Hint: Think "security.")
A3: In a directory that is password-protected at the server level. If you're dealing with extremely confidential data such as trade secrets, customer lists, and so on, you might want to add even more security measures. Some of these additional security measures will be discussed in Chapter 20, "Working with ColdFusion's Debugging Tools."
4: Name the four attributes used with NAMECONFLICT.
A4: They are error, skip, overwrite, and makeunique.
5: What file types may be read and written with <CFFILE>?
A5: <CFFILE>'s read, write, and append ACTIONs work only with text files. A special ACTION called readbinary will read binary content.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint