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 ?

0

2 Answers 2

-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/

Sign up to request clarification or add additional context in comments.

2 Comments

Another technique that will work on older browser it to create a form as normal but have jquery post it to a hidden iframe.
is there any way i can assign value of Path to <input type="file"> ?
-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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.