- see footer for list info -<
tostring(gethttprequestdata().content)

gives you the filenames and their contents - remove the filenames, cffile
the contents?

Course, you'll have to trim out just the file uploads, but it's a step
closer to where you want to be.



On 7/26/07, Gary <[EMAIL PROTECTED]> wrote:

>- see footer for list info -<
I tried copying the files that CF places in its temporary directory when a
HTTP post is received, but there are 3 problems with that.
1) The files are called neotmp12345.tmp so I can't determine if they are
jpg, wma, txt etc file types.
2) Their tmp names have no reference to link in with the HTTP post request
that put them there. I can't rely on the file timestamp because we could
receive concurrent posts.
3) A blind cffile action="copy" will grab hold of all tmp files include
some
that don't belong with the current HTTP post I'm trying to work with. I
can't rely on timestamps for said reason.

The last option is to grab the raw http content and manually extract and
decode each attachment. It's a bit silly to do that since CF was created
so
people don't have to do menial coding jobs like that!

Thanks, I appreciate your replies, Peter.

Gary F.



On 7/26/07, Peter Boughton <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> Hmmm. Last time I had to use PHP I was tripped up because by default it
> didn't split out seperate form fields - it only returns the first one.
> I had to change the form and append [] to the field names to get the
> multiple values.
> That was for checkboxes rather than file fields, but I'd expect it to be
> consistant across field types.
>
> Anyway, CF shouldn't remove them until the end of the request, because
it
> doesn't know if you'll later have a cffile/upload tag. Unless it's smart
> and
> looks ahead, inwhich case maybe you could put a dummy upload after the
> copy
> (but in a try/catch) and that might enable you to copy them. (which
> probably
> requires a cfdirectory first to find out what the filenames are.)
>
>
> On 7/26/07, Gary <[EMAIL PROTECTED]> wrote:
> >
> > >- see footer for list info -<
> > The sender is a commercial service and told me that their other
> customers
> > don't have a problem using their example code (which is in php). I
> looked
> > in
> > the tmp dir where the files are placed, but they don't appear in File
> > Explorer. Perhaps they come and go quicker than Windows can update
> > explorer.
> > I'll try a cffile "copy" if CF can blink that fast. Thanks for the
> > suggestion.
> >
> > Gary.
> >
> >
> > On 7/26/07, Peter Boughton <[EMAIL PROTECTED]> wrote:
> > >
> > > >- see footer for list info -<
> > > >> The sender can't change their form field names
> > > Why not?
> > >
> > > I'm fairly sure the files will get stored on the server without the
> > > cffile/action=upload - but in a temporary folder that probably gets
> > > deleted
> > > when the request ends. Try having a look inside your main CF
> directories
> > > to
> > > see if any files are getting generated, and then you can just copy
the
> > > file
> > > elsewhere.
> > >
> > > On 7/26/07, Gary <[EMAIL PROTECTED]> wrote:
> > > >
> > > > >- see footer for list info -<
> > > > A 3rd party is sending files to a CF script on my server using a
> HTTP
> > > post
> > > > and I'm using CFFILE action="upload" to grab them. The problem is
> > > they're
> > > > sending multiple jpeg files using the same form field name. So the
> > > > formfields sent to my server could be "description, jpg, jpg".
> > > >
> > > > ColdFusion is only giving me access to the 2nd jpg file,
presumably
> > > > because
> > > > it overwrites the first value. A cffump of "form" reveals just 2
> > fields
> > > > with
> > > > content - description and jpg. (Only 1 jpg). Viewing the raw HTTP
> data
> > > > confirm there are 2 jpg files, both variables called jpg. If I
were
> > > using
> > > > PHP it would let me treat form.jpg as an array so I'd loop over it
> to
> > > get
> > > > both jpg files, but CF is showing only 1 jpg file in its form
> > structure.
> > > >
> > > > Any suggestion please? (The sender can't change their form field
> names
> > > > sadly)
> > > >
> > > > Thanks,
> > > > Gary F.
> > > > _______________________________________________
> > > >
> > > > For details on ALL mailing lists and for joining or leaving lists,
> go
> > to
> > > > http://list.cfdeveloper.co.uk/mailman/listinfo
> > > >
> > > > --
> > > > CFDeveloper Sponsors:-
> > > > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> > > > >- Lists hosted by www.Gradwell.com -<
> > > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer
your
> > help
> > > > -<
> > > >
> > >
> > >
> > >
> > > --
> > > \ \
> > > Peter Boughton
> > > blog.bpsite.net
> > > / /
> > > _______________________________________________
> > >
> > > For details on ALL mailing lists and for joining or leaving lists,
go
> to
> > > http://list.cfdeveloper.co.uk/mailman/listinfo
> > >
> > > --
> > > CFDeveloper Sponsors:-
> > > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> > > >- Lists hosted by www.Gradwell.com -<
> > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your
> help
> > > -<
> > >
> > _______________________________________________
> >
> > For details on ALL mailing lists and for joining or leaving lists, go
to
> > http://list.cfdeveloper.co.uk/mailman/listinfo
> >
> > --
> > CFDeveloper Sponsors:-
> > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> > >- Lists hosted by www.Gradwell.com -<
> > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help
> > -<
> >
>
>
>
> --
> \ \
> Peter Boughton
> blog.bpsite.net
> / /
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
> -<
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to