This is not a Construct2 question, is it?
I guess you'd have to use PHP on a server and make the ajax call to that. I don't know anything about PHP, but I know it should be able to send a file when getting the right call. So yes you could use Ajax to make the call from construct2, but you'd need to know PHP to do anything useful with that call.