У меня есть dataURI, который при использовании в качестве href тега ссылки прекрасно сохраняется как MIDI-файл при нажатии в Chrome, и после сохранения проигрывается нормально (см. Код) … мой вопрос, если я отправил эту строку на сервер, как можно Я сохраняю это как файл, который играет? Я пробовал urldecoding и base64-кодирование, но сохраненный файл не может воспроизводиться … если бы вы могли предоставить код в php или coldfusion, который сохраняет строку в правдоподобный файл, который был бы великолепен!
<a href="data:audio/midi,MThd%00%00%00%06%00%01%00%02%01%e0MTrk%00%00%00%1a%00%C0%02%00%FF%51%03%05%16%15%00%FF%03%08%43%6f%6f%6c%65%79%27%73%00%FF%2F%00MTrk%00%00%06%5e%00%C0%02%00%90%3e%40%83%51%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%43%47%00%0f%48%40%1e%48%00%00%47%40%81%43%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%43%40%81%61%43%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%47%40%81%61%47%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%4a%40%81%61%4a%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%0f%3e%40%83%51%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%43%47%00%0f%48%40%1e%48%00%00%47%40%81%43%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%43%40%81%61%43%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%47%40%81%61%47%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%4a%40%81%61%4a%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%0f%4f%40%81%61%4f%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%4f%40%81%61%4f%00%0f%47%40%81%61%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%0f%4f%40%81%61%4f%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%4f%40%81%61%4f%00%0f%47%40%81%61%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%00%FF%2F%00">Download Midi File</a>
Предполагая, что $ b64_href — ваша строка. Этот код работает для изображений.
if ($b64_href > 2) // to avoid substr error
{
// DELETE "data:audio/midi," from your string
$b64_sub = substr($b64_href, strpos($b64_href, ",") + 1);
// CLEANUP replace space by plus
$b64_clean = str_replace(' ', '+', $b64_sub);
// DECODE your string
$raw = base64_decode($b64_clean, true);
if ($raw != FLASE)
// SAVE
else
// HANDLE ERROR
}
Я понял это … надеюсь, это поможет кому-то
<cfset dataURI="data:audio/midi,MThd%00%00%00%06%00%01%00%03%01%e0MTrk%00%00%00%1a%00%C0%02%00%FF%51%03%05%16%15%00%FF%03%08%43%6f%6f%6c%65%79%27%73%00%FF%2F%00MTrk%00%00%06%5e%00%C0%02%00%90%3e%40%83%51%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%43%47%00%0f%48%40%1e%48%00%00%47%40%81%43%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%43%40%81%61%43%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%47%40%81%61%47%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%4a%40%81%61%4a%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%0f%3e%40%83%51%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%43%47%00%0f%48%40%1e%48%00%00%47%40%81%43%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%43%40%81%61%43%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%47%40%81%61%47%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%4a%40%81%61%4a%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%47%40%83%51%47%00%0f%40%40%81%61%40%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%45%40%81%61%45%00%0f%47%40%81%61%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%0f%4f%40%81%61%4f%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%4f%40%81%61%4f%00%0f%47%40%81%61%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%83%51%40%00%0f%4f%40%81%61%4f%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%3e%40%81%61%3e%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%45%40%83%51%45%00%0f%42%40%81%61%42%00%0f%45%40%81%61%45%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%4f%40%81%61%4f%00%0f%47%40%81%61%47%00%0f%4c%40%81%61%4c%00%0f%47%40%81%61%47%00%0f%47%40%83%51%47%00%0f%4a%40%81%61%4a%00%0f%4c%40%81%61%4c%00%0f%4e%40%81%61%4e%00%0f%4f%40%81%61%4f%00%0f%51%40%81%61%51%00%0f%4e%40%81%61%4e%00%0f%4c%40%81%61%4c%00%0f%49%40%81%61%49%00%0f%4a%40%81%61%4a%00%0f%47%40%81%61%47%00%0f%45%40%81%61%45%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%81%61%40%00%0f%42%40%81%61%42%00%0f%3e%40%81%61%3e%00%0f%40%40%87%31%40%00%00%FF%2F%00MTrk%00%00%07%0b%00%C0%02%00%C0%02%83%60%90%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%26%40%81%70%26%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%21%40%81%70%21%00%81%70%32%30%00%36%30%00%39%30%81%70%32%00%00%36%00%00%39%00%81%70%28%40%81%70%28%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%81%70%23%40%81%70%23%00%81%70%34%30%00%37%30%00%3b%30%81%70%34%00%00%37%00%00%3b%00%00%FF%2F%00">
<!--- strip out the MIME type info (the text before the first comma) --->
<cfset dataURI =listLast(dataURI)>
<!-- get rid of %... is this used as a separator for human readability? --->
<cfset dataURI =replace(dataURI,"%","","all")>
<!--- change MThd to hex --->
<cfset dataURI =replace(dataURI,"MThd","4D546864","all")>
<!--- change MTrk to hex --->
<cfset dataURI =replace(dataURI,"MTrk","4D54726B","all")>
<!--- uppercase --->
<cfset dataURI =Ucase(dataURI)>
<!--- convert to binary encoded as hex--->
<cfset dataURI = BinaryDecode(dataURI, "Hex")>
<cffile action="write" file = "#getDirectoryFromPath(getTemplatePath())#myConvertedFile.midi" output="#dataURI#" addNewLine = "no" >