diff --git a/js/upload.js b/js/upload.js
index 9aaa077..c0a8cc6 100644
--- a/js/upload.js
+++ b/js/upload.js
@@ -7,12 +7,12 @@ $(function(){
paramname:'image',
maxfiles: 5,
- queuefiles: 1,
maxfilesize: 10,
url: 'upload.php',
uploadFinished:function(i,file,response){
$.data(file).addClass('done');
+ $.data(file).find('.linkBox').val(response.file);
// response is the JSON object that post_file.php returns
},
@@ -61,13 +61,16 @@ $(function(){
'
' +
+ '' +
+ '' +
+ '
' +
'';
function createImage(file){
var preview = $(template),
- image = $('img', preview);
+ image = $('img', preview);
var reader = new FileReader();
diff --git a/upload.php b/upload.php
index 3dae520..df52917 100644
--- a/upload.php
+++ b/upload.php
@@ -17,5 +17,5 @@ if(array_key_exists('image', $_FILES)) {
move_uploaded_file($file['tmp_name'], UPLOADS . $file['name']);
}
-echo json_encode(array('status'=>'Uploaded successfully'));
+echo json_encode(array('status'=>'Uploaded successfully','file'=>'http://screens.p5dev.com/' . UPLOADS . $file['name']));
?>
\ No newline at end of file