I hate AjaxFileUpload.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #388912
    espher
    Participant

      Got an ASP.NET page with a VB.NET codebehind. I’m trying to use the image upload functionality built into the HtmlEditorExtender, as we’re trying to put in a WYSIWYG editor for a scratchpad-style part of a page.

       

      Here’s the codebehind:

       

      Protected Sub HtmlEditorExtender1_ImageUploadComplete(sender As Object, e As AjaxControlToolkit.AjaxFileUploadEventArgs) Handles HtmlEditorExtender1.ImageUploadComplete
      Dim fullpath As String = Server.MapPath("~/kb/images/") + e.FileName
      Dim ajaxFileUpload = DirectCast(sender, AjaxFileUpload)
      ajaxFileUpload.SaveAs(fullpath)
      e.PostedUrl = fullpath
      End Sub

       

      It fails to work on the dev server (before calling the function) but I think that’s a perms issue we’re trying to get sorted out; however, in debug, the upload “suceeds”, but it fails on the SaveAs step, saying it can’t find the file on the local machine (it’s looking in %UserProfile%AppDataLocalTemp_AjaxFileUpload{some string of characters it creates}filename.jpg). If the _AjaxFileUpload folder doesn’t exist, it creates it, but it doesn’t create the subfolder (that I can see) or the temp img file. I’m at my wits’ end trying to figure out why this won’t work.

       

      Any thoughts? <img decoding=” src=”/wp-content/uploads/invision_emoticons/default_SA_wink.gif”>

      #403302
      pksage
      Keymaster

        Stop using ASP.NET and VB and use stuff designed for ease of implementation like jQuery and Java? <img decoding=” src=”/wp-content/uploads/invision_emoticons/default_SA_smile.gif”>

        #403311
        espher
        Participant
          Stop using ASP.NET and VB and use stuff designed for ease of implementation like jQuery and Java? <img decoding=” src=”/wp-content/uploads/invision_emoticons/default_SA_smile.gif”>

           

          If my coworker had his call everything would be PHP and jQuery.

           

          Unfortunately, he doesn’t, and neither do I. <img decoding=” src=”/wp-content/uploads/invision_emoticons/default_SA_wink.gif”>

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.
        Back to top button