1.0.21 • Published 7 years ago
simpapp-phonegap-file-upload v1.0.21
jQuery File Upload
jQuery is required. If not included will automatically load jQuery.min from Google Hosted Libraries
Installing
Just include the simpapp.js file as following and use after pageload event :
<!DOCTYPE HTML>
<html>
<head>
<title>File Upload Example</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<div>
<span id="upload-progress">0</span>
<input type="file" name="img" id="image" multiple />
<button class="" onclick="submit();">Upload</button>
</div>
</body>
<script type="text/javascript">
function submit()
{
var opts = {
multiple: true
};
console.log('file submited');
simp.init("http://forum.simpapp.ro/testup.php", opts);
simp.doUpload(function (data)
{
console.log(data);
alert('uploaded');
},function (err)
{
console.log(err);
alert('failed');
},function onProgress(percent)
{
$('#upload-progress').html(percent + '%');
});
}
</script>
<script type="text/javascript" src="simpapp.js"></script>
</html>
opts = {
multiple: false, //Inputs have "multiple" tag
progress: true, //if you want the upload to return percentage
inputName: [], // for multiple file inputs, leave blank for default.
};
1.0.21
7 years ago
1.0.20
7 years ago
1.0.18
7 years ago
1.0.17
7 years ago
1.0.16
7 years ago
1.0.15
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago