我在从输入类型文件发送目标文件时遇到问题,我尝试将目标文件转换为base64,以便将其存储在带有FileReader的数据库中,但它不起作用,请帮助。< / p>
<script type="text/javascript">
function edit()
{
var data = document.getElementById("actualizar");
var file = data.files[0]; //object file that i want to send
var size = file.size;
var name = file.name;
var type = file.type;
var value = file.value; //fakepath
$.post("updfile.php", {name : name, size : size, type : type}, function(data){
});
};