Skip to content

Instantly share code, notes, and snippets.

@SimonGivre
SimonGivre / putIO-convert-to-MP4.js
Created August 30, 2012 09:47
put.io JS to convert into MP4 every file of folder
console.log($('.filelist .file-name .ftype:contains(video)').length + ' files to convert');
var cpt=0;
$('.filelist .file-name .ftype:contains(video)').each(function(){
var row = $(this).prev();
var id = row.attr('href').substring(row.attr('href').lastIndexOf('/')+1);
$.post('/v2/files/'+id+'/mp4',function(data){
console.log(data.status);
if(data.status=="OK") cpt++;
});
});