Alex
Member since May 18, 2009
- Profile: /members/3432-alex.htm
- Comments: 29
Recent Blog Comments By Alex
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Dec 22, 2009 at 9:48 AM
@Ben > mime type Sorry. I should've clarified. You can't get mime type for multiple file uploads with the same field name. Which is my whole gripe. All your left with is a bunch of binary temp files on the server. You can get the file names from getHttpRequestData(). Why support _some_ of HT... read more »
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Dec 18, 2009 at 7:13 PM
The only other issue with cffile is that you cannot retrieve the original mime type. This becomes a problem when you go to serve the uploaded files. Especially out of a database. Serving a file requires a mime type, e.g., image/jpeg. You need to add a file extension to mime type lookup. E.g., file... read more »
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Dec 15, 2009 at 12:38 PM
@Barry > crud images MySQL blob data type < http://dev.mysql.com/doc/refman/5.0/en/blob.html > ColdFusion MySQL data source, enable BLOB < http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_10.html> > crop images ColdFusion ImageCrop function <... read more »
-
Exploring Mixins And ColdFusion Components
Posted on Oct 3, 2009 at 1:27 AM
@ben Dango! Just now saw your post about swapping CFC methods at runtime. I have to keep up with your blog more.... read more »
-
Exploring Mixins And ColdFusion Components
Posted on Oct 3, 2009 at 1:19 AM
@ben Seems like there should be a better way to make modules (OOP, not cfmodule) and mixins. I mean, in a rubyesque way. Psuedocode is easier. comp Math ...func pi ...func sin ...func cos comp Debug ...func print ...func dump ...func inspect Use Math as a ruby module. Similar to ruby's require... read more »
-
Cannot Invoke Method On An Object Of Type coldfusion.runtime.VariableScope With Named Arguments
Posted on Oct 3, 2009 at 12:41 AM
@ben The variables scope of a component is part of the class definition, not an object instance definition. You can use it for class methods, class constants, et al. The this scope of a component is part of an object instance definition. You can use it for instance methods, instance properties, et... read more »
-
Turning On Multiple Statements In ColdFusion 8 MySQL 4/5 Datasource
Posted on Oct 1, 2009 at 10:22 AM
@ben > stored procedures The example I've shown using prepared statements is just directly using the same method ColdFusion/Java uses to do parameterized queries. This isn't really using stored procedures. This is just a way to do multiple statements/resultsets in a single database call. Usual... read more »
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Oct 1, 2009 at 10:07 AM
@Ben > where are you grabbing the form data from? You're right, ColdFusion/Java intercepts the file data. For multiple file uploads with the same form field name, you gotta do an end run around. The form scope will give you the filename of the last uploaded file. <cfsavecontent variable="... read more »
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Sep 29, 2009 at 10:56 AM
> concatenated into a list Yes. That is why the form and url scopes are stupid. Granted, the good thing about the form and url scopes are their ease of retrieving values. Assuming you only want the first value or there are no commas. Which is probably 99% of the time. But they break even the s... read more »
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Sep 29, 2009 at 10:28 AM
@Ben > naming files the same thing This is my usual strategy for JavaScript add/delete/rearrange. <fieldset class="item"> <input name="title" type="text"/> <input name="description" type="text"/> <input name="file" type="text"/> </fieldset> That way, you don't ha... read more »
-
Ask Ben: Uploading Multiple Files Using ColdFusion
Posted on Sep 29, 2009 at 10:14 AM
I discovered a problem with the CF file upload thing: file parameters with the same parameter name. They all upload to CF, you just can't retrieve them as easily. <input type="file" name="file0"/> <input type="file" name="file1"/> This works fine. <input type="file" name="file"/>... read more »
-
Turning On Multiple Statements In ColdFusion 8 MySQL 4/5 Datasource
Posted on Sep 29, 2009 at 10:02 AM
This trick doesn't return multiple resultsets. ........................................ <cfset query={}/> <cfquery name="query.resultSet" result="query.details" datasource="dev"> select 0; select 1; </cfquery> <div>query: <cfdump var="#query#"/></div> ........ read more »
-
ColdFusion Application.cfc OnRequest() Creates A Component Mixin
Posted on Sep 25, 2009 at 2:53 PM
You can also is Ben's technique to do page-specific mixins. Separate your business logic from display logic! This is similar to code behind files in ASP.NET. (Although ASP.NET provides late bind and other stuff.) Keep in mind this is simplified to demonstrate. This just does pre-processing. Theor... read more »
-
ColdFusion Application.cfc OnRequest() Creates A Component Mixin
Posted on Sep 21, 2009 at 10:43 AM
Also cool is the ability to use CFM pages as modules, instead of includes. <cfinclude template="#arguments.targetPage#"/> <cfmodule template="#arguments.targetPage#"/> You can then do some fancy stuff, like pass attributes. <!--- <cfset uri="/blog/805-ColdFusion-Application-cfc... read more »
-
ColdFusion Basics : Nesting Custom Tags
Posted on Sep 21, 2009 at 9:17 AM
@ben > which parent I'd say there's only one. There are other levels, grandparents, great grandparents. But shouldn't you let your parent talk to your grandparent? I'm thinking error handling, event handling, et al. These things need to bubble up the chain. How about this scenario. ............ read more »
-
ColdFusion Basics : Nesting Custom Tags
Posted on Sep 16, 2009 at 1:43 PM
> [index + 1] Sorry for the weird syntax. I am still getting used to arrays starting at 1. I am currently in denial about it.... read more »
-
ColdFusion Basics : Nesting Custom Tags
Posted on Sep 16, 2009 at 1:36 PM
@ben > cfassociate This tag is stupid. Why would the parent tag just want to know what attributes were passed to the child? How about content? > GetBaseTagList() > I would NOT recommend this as you never really know where the parent tag name will show up in the base tag list. I am just... read more »
-
Creating A Centralized Point Of Entry For ColdFusion Scheduled Tasks
Posted on Aug 26, 2009 at 11:33 AM
@Jeff Ajax would not work. HTTP responses, including JavaScript are not browsed by the task scheduler. Scheduled tasks are a way of running CF as generic scripts. Not HTTP requests/responses. No?... read more »
-
Creating A Centralized Point Of Entry For ColdFusion Scheduled Tasks
Posted on Jun 30, 2009 at 4:37 PM
Definitely a tried and true strategy for scheduling. Especially for related/dependent tasks. - Error handling between steps - Success required/optional - Retry 10 times, then quit - Do if not done already today, this hour - Pick up where left off, before error - Avoid multiple exec if still running... read more »