duanpuchen3142 2019-03-27 12:40
浏览 155

将录音保存在文件夹中

I am using this GitHub project to record some audio on a website, I want to save that file in a folder instead of displaying it on the website. https://github.com/addpipe/simple-web-audio-recorder-demo

The current version is creating a download link and displaying the audio clip on the website, I've attempted to send the data to PHP using AJAX.

    $.ajax({
      url: "uploadAudio.php",
      type: "POST",
      data: "audio", blob,
      processData: false,
      contentType: false,
      success: function(data){
        alert('success');
      }
    });

and the PHP code I tried to save it as a file

    <?php
    $dir = "uploads/";
    move_uploaded_file($_FILES["audio"]["tmp_name"], $dir. "name");
    ?>

Am I thinking along the right lines? have you got any suggestions for a better way of doing this?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 教务系统账号被盗号如何追溯设备
    • ¥20 delta降尺度方法,未来数据怎么降尺度
    • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
    • ¥15 再不同版本的系统上,TCP传输速度不一致
    • ¥15 高德地图点聚合中Marker的位置无法实时更新
    • ¥15 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题
    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式