This isn't the right tool for the job. But this code seems to work.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<cfif StructKeyExists(FORM , 'fieldnames')>
<cfdump var="#FORM#" />
<script>setTimeout(function(){window.history.back();} , 2000);</script>
<cfelse>
<script>setTimeout(function(){document.getElementById('somefrm').submit();}
, 20000);</script>
<form method="post" id="somefrm" enctype='multipart/form-data'>
<input type="file" name="somefile">
</form>
</cfif>
</body>
</html>
On Thu, Aug 7, 2014 at 10:45 AM, John M Bliss <[email protected]> wrote:
>
> In other words, if you have CF running locally, you could write something
> that performs a cfhttp post to server...mimicking browse, select file,
> click submit.
> On Aug 6, 2014 8:42 PM, "John M Bliss" <[email protected]> wrote:
>
> > ...or HTTP post.
> > On Aug 6, 2014 8:39 PM, "John M Bliss" <[email protected]> wrote:
> >
> >> In short, no. You'd have to deliver file to server via email / FTP /
> etc.
> >> On Aug 6, 2014 8:36 PM, "Phillip Vector" <[email protected]>
> >> wrote:
> >>
> >>>
> >>> So I have a server that reads a file that is submitted to it and
> >>> processes
> >>> the contents. I can not touch this server and change any settings on
> it..
> >>>
> >>> I want to take a file I have (Let's call it data.txt) and upload it to
> >>> the
> >>> server once an hour. I can just reload the page once an hour or I can
> set
> >>> up a schedule, no problem.. I just can't seem to automate the browse
> >>> button
> >>> to pick the file (which I can understand not allowing).
> >>>
> >>> So is there any way for me to not use the browse button and post it
> >>> directly to an address like a form?
> >>>
> >>>
> >>>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359078
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm