java - Why can I only upload one file using Play and uploadify? -



java - Why can I only upload one file using Play and uploadify? -

i wrote simple play-uploadify demo.

i want upload button automatically upload image each time pressed.

for reason, first time button pressed, upload. after button has been pressed once, farther presses not cause unless "cancel" previous uploads.

(i don't understand meaning of canceling upload auto mode. perhaps problem downloads never "complete" in sense?)

here action method:

public static void upload(file file, long userid){ system.out.println("uploaded file name " + file.getname() + " user " + userid); }

and phone call uploadify:

$(function() { $("#uploader").uploadify({ uploader : '/public/libraries/uploadify/uploadify.swf', script : '/application/upload', cancelimg : '/public/libraries/uploadify/cancel.png', folder : '/uploads', fileext : '*.jpg;*.gif;*.png', filedesc : 'image files', filedataname: 'file', scriptdata: {userid: 123}, auto: true }); });

also, upload never seems finish - when add together oncomplete handler, does't fire.

the problem was not returning http 200 status code, because didn't phone call render method or homecoming value @ end of action method.

adding rendertext("ok"); resolved problem.

ok(); neater way of resolving it.

java javascript image playframework uploadify

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -