Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ajaxfileupload - multiple issues

$
0
0

on my user's account page, i want to display their profile picture as an image button. if they wish to change their avatar, they would click the button which would display an ajaxFileUpload control.

they would then select their new avatar; i would check it for MIME Type and size, and if it's valid i will save it to the server and update their avatar record.

however, NONE of this will work with the ajax file upload.

my multiple issues include:

  • there is no "posted file" property of the ajaxFileUpload control so it's impossible to access the file to check the MIME Type
  • the this.Page.Request.Files.Count is 0 so i can't try an access the file that way to check the MIME Type
  • the control will not work if it's not visible from the start - the upload will not complete
    • this means i can't display the file upload only when they click the image, unless i send them to another page which would be pointless
    • it's the same whether the visibility of the upload control itself is switched, or the visibility of a parent control e.g. a panel
  • it doesn't work in any parent control
  • it doesn't work in any update panel, so even if visibility could be switched it could only be done by means of a full postback

i cannot be the only one to have attempted such basic things as having the visibility of the control change or try to access the posted file?

is there any solution?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>