coldfusion

Using Coldfusion's CFFILE tag to monitor a progress log from FFMpeg

不羁岁月 提交于 2019-12-23 20:03:09
问题 I want to learn how to use the CFFILE tag from ColdFusion to read the contents of a text file. In my case, that text file is a progress log that is generated by FFMpeg while it transcodes a media file. I want to write a ColdFusion script that will poll the progress log periodically, until the log indicates that FFMpeg has finished its transcoding operation. On the client side I can then use Ajax to hit that ColdFusion script and show the user a "percentage completed" while FFMpeg does its

404 error - Google attempting to index ColdFusion CFC

回眸只為那壹抹淺笑 提交于 2019-12-23 19:27:25
问题 For months, our IIS/ColdFusion server has been throwing 404 errors during Google crawler scans. Normally it's easy to track these down but in this case, Google is trying to scan our CFC files. The files do exist, but they are not exposed to the Internet - only to the ColdFusion server. Nevertheless, Google is seeing links to the CFCs somewhere on our site and is trying to follow them. Below is a dump of our CGI structure during one of the 404's. baseCFC is a CF Mapping to D:\Domains\[domain]

Differences between New/CreateObject() vs EntityNew() in CF9 for persistent CFC?

纵然是瞬间 提交于 2019-12-23 19:13:41
问题 What are the differences (if any) between New/CreateObject() to create an object vs EntityNew() to create an entity in CF9 for persistent CFC? 回答1: With New() and CreateObject() you need to specify the full path to the CFC. With EntityNew() you just need to pass in the name of the entity. 回答2: quoted from: Learning ColdFusion 9: EntityNew() vs. The NEW Operator / CreateObject() I actually asked this question during the "Advanced ORM" session at CFUNITED and got a slightly different answer.

How do you deep clone a persistent entity in ColdFusion ORM?

徘徊边缘 提交于 2019-12-23 19:11:09
问题 I have a persistent entity that I'm using as a template: Company Locations Departments Employees In other words, a Company contains many Locations , which contains many Departments , which contains many Employees . I have one Company set up as a template that should be copied when a new company is created. However, this template is persistent in the database. I tried using the following code to deep clone it: var template = EntityLoadByPK("Company", 13); var company = Duplicate(template);

Get large (original size image) in Picasa RSS feed

谁都会走 提交于 2019-12-23 19:07:08
问题 I'm using a Picasa RSS feed no problem but I can't get the original large size image that I uploaded. When uploading via Picasa I purposely chose to upload 'Original size' (quite big). The feed URL's only point to smaller images. How do I get the original big image from picasa? I'm able to hack to URL from inspecting the image on the Picasa website so this is an example of the photo I want: https://lh3.googleusercontent.com/-yam9QV2NG40/ULKIMTKvQzI/AAAAAAAAAA4/ownr930MvGg/ s2048 /Blasket

Obtaining browser and version using Coldfusion

左心房为你撑大大i 提交于 2019-12-23 18:38:14
问题 Is there something built into Coldfusion that would let me know the browser and version number surfing my site? Are there existant libraries that would enable me to do this? My google-fu hasn't shown many things other than simple if statements detecting IE. I did do a dump of the cgi.http_user_agent variable in Chrome: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24 There's three different browsers mentionned in there! Doing an if statement

Fix for Unicode Transformation Issue/Vulnerability in ColdFusion

十年热恋 提交于 2019-12-23 18:27:09
问题 We upgraded our security scanner recently, and it's reporting a new issue. What's the recommended fix? (We happen to be on ACF9.) (Also, if you have an example exploit geared to CF, I'd appreciate it.) Unicode transformation issues Severity High Type Configuration Reported by module Scripting (XSS.script) Description This page is vulnerable to various Unicode transformation issues such as Best-Fit Mappings, Overlong byte sequences, Ill-formed sequences. Best-Fit Mappings occurs when a

How can I get the parent of the current file?

淺唱寂寞╮ 提交于 2019-12-23 18:00:33
问题 To get the current *.cfm file I use: GetFileFromPath(GetCurrentTemplatePath()) Is there a simple way to get the parent of the current file? I.e. if the current file is ...\MyApp\Users\addUser.cfm I want to return Users . Edit: the reason I want to do this is to check for access permission. Depending on path different policies will be enforced. Edit: The linked question doesn't provide the correct answer. 回答1: GetFileFromPath(GetFileInfo(GetCurrentTemplatePath()).parent) This will return

turn a web page into an image with ColdFusion, Java or command line utility?

試著忘記壹切 提交于 2019-12-23 17:36:59
问题 Native ancient solution in ColdFusion that used to work with HTML 3.x... <cfhttp url="#targetUrl#" resolveurl="yes"> <cfdocument format="pdf" name="pdfVar"> #cfhttp.filecontent# </cfdocument> <cfpdf action="thumbnail" source="#pdfVar#" pages="1" destination="image"> <cfimage action="writeToBrowser" source="#image#"> Super slow, even with cache, many CSS styles missing or broken. Any good server-side solution to capture a rendered webpage into a thumbnail? like service provided by http://www

What is the most direct way to reproduce this printf-like format with ColdFusion?

北城余情 提交于 2019-12-23 17:04:58
问题 I've been thrown into ColdFusion for a very simple assignment. The application has some logic to display "help codes" (let's not get into what is a help code), however, the logic is buggy and needs to be fixed. Given a two-letters code, a 1-4 digits number, and another 1-2 digits number, I would need to display them like this printf call would: printf("%s%04d%02d", letterCode, bigNumber, smallNumber); If you're not familiar with the printf function, it accepts a format string (the first