2

I have an output of

C:/Path/file/file.mp3

now I need to fetch the file from the path and upload using jquery

and store that file to 'audioData' variable...

$.ajax({
    type: "POST",
    url: 'URL',
    data: {
        image: imageData,
        audio: audioData
    }
    // etc
});

How can I get in php? as a FILE or POST ?

Abraham K
  • 624
  • 1
  • 8
  • 24

2 Answers2

-1

Ajax what not supposed to be used to upload file, that's form with multipart type job. However some browser are now supporting it, but not all of them, this works nice check a look:http://net.tutsplus.com/tutorials/javascript-ajax/uploading-files-with-ajax/

sandino
  • 3,813
  • 1
  • 19
  • 24
-1

Post file through ajax and form? That could happen, see upload file through ajax

Post file through ajax without form? I dont think so.

Community
  • 1
  • 1
蒋艾伦
  • 464
  • 1
  • 5
  • 16