English 中文(简体)
装满孔径不会被称作
原标题:Uploadify onComplete is not getting called

我用春v和 j顶高载重来重载图像,我上载的文字能挽救我的服务器的形象,我的形象得到挽救,但上载却正在扔进吉大港山区,而Complete没有被发射。 我确信,我的文字正在返回。 这里是我的法典。

 $(document).ready(function() {
             $( #upload ).click(function() {
                 $( #uploadify ).uploadifyUpload();
                    return false;
                 });
                 $( #uploadify ).uploadify({
                     uploader :  js/uploadify/uploadify.swf ,
                     script :  uploadcreate.htm;jsessionid=${sessionId} ,
                     multi : false,
                     auto  : true,
                     fileDesc :  JPG Image Files (*.jpg),JPG Image Files (*.JPG),JPG Image Files (*.JPEG) ,
                     fileExt  :  *.jpg;*.jpeg;*.JPEG; ,
                     cancelImg :  js/uploadify/cancel.png ,
                    onComplete: function (event, queueID, fileObj, response, data) {
                        alert("as");
                        //$("#showimage").html( <img src="  + response +  " height="500" width="500" /><br />http://localhost:8080  + fileObj.filePath);

                         }
                 });
         });

我的《控制器法》是:

@RequestMapping(value="/uploadcreate.htm", method = RequestMethod.POST)
    public JSONObject uploadcreate(UploadProperties uploadbean, BindingResult result, HttpServletRequest request, Model model) {
        System.out.println("started uploading");
        if (result.hasErrors()) {
            for (ObjectError error : result.getAllErrors()) {
                System.err.println("Error in uploading: " + error.getCode()
                        + " - " + error.getDefaultMessage());
            }
            return null;
        }
        String relativeWebPath = "/WEB-INF/uploads";
        String absoluteFilePath = request.getServletContext().getRealPath(relativeWebPath);
        String username = request.getUserPrincipal().getName();

        JSONObject filepath = uploadFacade.upload(uploadbean, username, absoluteFilePath);

        model.addAttribute("filePath", filepath);
        return filepath;

    }
最佳回答

上述执行工作的主要问题是本届会议。 我的春天安全感正在创造不同的会议,因此我的要求没有得到认证。 我从我春天的安全组合档案中删除了安全内容,如此。

<intercept-url pattern="/uploadcreate.htm" filters="none" />

之后,我还面临其他一些问题,但我通过妥善处理本届会议,绕过了这一问题。

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签