0

What a pain in the ...

Flex2
*sigh* Ok, finally.
Here's what I've found out, and it seems like this will fix my problem with file uploading in Flex/Coldfusion.
Firefox apparently uses two windows when dealing with file uploads as pertains to Flex.
What happens is, that second window drops the session info, and you wind up getting a 302 httpstatus code. (as a note, using something like Ngrep in linux or Windows, or Wireshark in Windows, to sniff your own network traffic to see the raw response will help you decipher what's failing. I was able to see that it was trying to redirect me to the login.cfm template)
What fixed it was returning the JSESSIONID from a Remote Object/CFC call, and using it in the URL string that I used in the URLRequest upon file uploading.
I.e., var req:URLRequest = new URLRequest();
req.url = "upload.cfm?jsessionid=" + jsessionid;
req.method = URLRequestMethod.POST;
fileRef.upload(req);

"JSESSIONID" is set a little above the code with the Remote Object/CFC call.
And voila! That's how you upload files if you're behind HTTPS. *whew*
0

ok, if anyone out there has some info on this, I'm all ears.

cf8, Flex2
*sigh* Ok, so I gave up testing Flex file uploads in an authenticated environment on my Linux box here at work.
It was simply a no-go.
It works fine in Windows if I hard-code the destination in the cffile tag.
If I don't do that, I get 302 redirects to the login page we have. This is coded in the application.cfm. (If you're not logged in, go to the login template)
This is weeeeiiiirrrddd.
0

Annoying Flex file upload problem...Fixed?

Flex2
Issue: File upload using Flex works fine in a normal (meaning non-authenticated) environment. Inside an authenticated environment, I get http status code 302 (redirection, basically)
After pulling my hair out and wondering what the heck was going on, I finally read online a recommendation to use a network sniffer to see what the responses were from my local server. Alrighty, I was familiar with ngrep, and have used it before for just boring network sniffery purposes, so fine. I'll try ngrep.
Ok, I ran that (making sure it was listening to my localhost traffic) and voila, sure enough, since I had moved my Flex app inside of one of our sites that requires logging in, it was showing a 302 message, along with the url to our login template.
My hunch is that I need to worry about keeping the app's session variables present. I found a nice little Forta article that I'm going to read up tonight and test out tomorrow.
At least, I HOPE that's what my problem here is... (Flex file uploading is a pain.)

0

Flex2/Actionscript 3 model objects and value objects

Flex2

ok, so NOW Flex is really gettin' fun. I started tinkering with model objects last night.

Here's my first one (for my simple little blog)

 

package blogMO
{
   
    public class blogMOEntry
    {
        public var _ridBlog:int;
        public var _vcBlog:String;
        public var _intUsers:int;
        public var  _dtCreate:Date;
        public var _intType:int;
       
        public function get ridBlog():int{
            return _ridBlog;
        }
        public function get vcBlog():String{
            return _vcBlog;
        }
        public function get intUsers():int{
            return _intUsers;
        }           
        public function get dtCreate():Date{
            return _dtCreate;
        }
        public function get intType():int{
            return _intType;
        }


        public function set ridBlog(value:int):void{
            _ridBlog = ridBlog;
        }
        public function set vcBlog(value:String):void{
            _vcBlog = vcBlog;
        }
        public function set intUsers(value:int):void{
            _intUsers = intUsers;
        }
        public function set dtCreate(value:Date):void{
            _dtCreate = dtCreate;
        }
        public function set intType(value:int):void{
            _intType = intType;
        }
       
/*         public function toVO():blogEntryVO
        {
            var vo:BlogVO = new BlogVO;
                vo.ridBlog = ridBlog;
                vo.vcBlog = vcBlog;
                vo._intUsers = _intUsers;
                vo.dtCreate = dtCreate;
                vo.intType = intType;
            return vo;
        }

        public static function fromVO(vo:SchoolVO):School
        {
            var mo:BlogMO = new BlogMO();
                mo.ridBlog = vo.ridBlog;
                mo.vcBlog = vo.vcBlog;
                mo._intUsers = vo._intUsers;
                mo.dtCreate = vo.dtCreate;
                mo.intType = vo.intType;
            return mo;
        } */
        public function blog(){}
       
       
    }
}

 

Very straightforward.

It's all coming together in my wally-mind. Slowly but surely.

Pardon me, time to go meditate on my Flex 2 koan.

Ommmm.

-1

CF8, Flex, etc.

cf8, Flex2, coding stuff in general

a few housecleaning items:


CFPDF worked like a charm. I was able to output our pdf like we had with the custom tag without  a problem. Very, very cool.

 

Flex is more and more fun for me. As it stands now, I've got an image preview/upload app that puts the images you have into a tile list 3x4.
The images all have a 'sort_order' property to them, and that gets updated in the db when you drag and drop the images around in the list.

I hope to get an example of this up in the next day or so. While it's not exactly reinventing the internet or anything, it was a HUGE amount of fun doing it.

0

Flex really *can* be easy to use. WTF?

Flex2

ok, so for whatever reason, getting Flex to move from dev server to live server has been the biggest pain in the butt.
See, here's what my conception of the entire process was:

Compile with local machine's services-config.xml file (that had the localhost and port number hard coded in it).

Get ready to move out to live.

Recompile with live server's services-config.xml file.

Hope for the best.

 

Some observations:

You can just compile with a services-config file in the directory your flex source code is in.
Leave the URL with the default {} stuff.

Move to your server.
That's it.
You can still use REMOTE OBJECT mxml tags.
FAR easier than messing with AS if you don't want to.

Ok, I'm back on the Flex bandwagon now. Having THAT big pain in the butt outta the way smoothed it out sooo much more.

Note: *I* did not figure that out. My coworker, Brandon C. did. So there.  

tags:
Flex2

Search