Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is how i am saving files currently

C#
function upload(blobOrFile) {

        var xhr = new XMLHttpRequest();
        xhr.open('POST', 'saveaudio.php', true);
        xhr.onload = function (e) {
            var result = e.target.result;
        };

        xhr.send(blobOrFile);

    }


And it saves through php using

PHP
<?php
error_log('audio save called');
$blob = $_POST['thefile'];
$filename = $_POST['filename'];

$post_data = file_get_contents('php://input');

$filePath = 'video/doesitwork.wav';
file_put_contents($filePath, $post_data);




?>


Can anyone help me save this exact way but using FormData ,Xml seems to be having issues.
Thank you
Posted
Updated 9-Feb-14 19:21pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900