is there any sample showing how to use apb blobstore with ajax?
when I use forms, it works fine, but if I use jquery, I don’t know how to submit the file, and I get this error:
blob_info = upload_files[0]
IndexError: list index out of range
I have this code in javascript
function TestAjax()
{
var nombre="Some random name";
ajax={
type: "POST",
async:true,
url:"{{upload_url}}",
data:"nombreEstudio="+nombre,
error: function ()
{
alert("Some error");
$("#buscando").html("");
},
success: function()
{ alert("it ok") }
};
$.ajax(ajax);
}
When I use forms, the file that he submitted is with an input tag (just like a sample document)
source
share