adding a tag to nanogong.wav realname file

skala
Juan Carlos Raña 13 years ago
parent a9f4382dce
commit 3ace872fef
  1. 2
      main/document/record_audio.php
  2. 4
      main/inc/lib/nanogong/receiver.php

@ -140,7 +140,7 @@ function submitVoice() {
var nano_group_id="<?php echo api_get_group_id(); ?>";
var nano_session_id="<?php echo api_get_session_id(); ?>";
//path, url and filename
var filename = document.getElementById("audio_title").value+".wav";
var filename = document.getElementById("audio_title").value+"_chnano_.wav";//adding name file, tag and extension
var filename = filename.replace(/\s/g, "_");//replace spaces by _
var filename = encodeURIComponent(filename);
var filepath="<?php echo urlencode($filepath); ?>";

@ -46,7 +46,9 @@ $filename = Database::escape_string($filename);
$filename = replace_dangerous_char($filename, $strict = 'loose');// or strict
$filename = disable_dangerous_file($filename);
$title= str_replace('_',' ',$filename);
$title= trim(str_replace('_chnano_.','.',$filename));//hide nanogong wav tag at title
$title= str_replace('_',' ',$title);
//
$documentPath = $filepath.$filename;

Loading…
Cancel
Save