This question is locked. New answers and comments are not allowed.
I am attempting to use the Upload control to allow my users to upload pictures and/or videos. When the picture/video is uploaded to the server it is given a unique ID and a URL. I am attempting to pass the ID and URL back up to the JavaScript so that I can add the picture/video to the page without having to refresh the entire page. How I am doing this is by simply adding the URL and ID of the pictures and videos to the return Json object in my action like so:
PhotoURLs and VIdeoURLs are strings of their respective URLs and IDs. I then attach a listener to the "onSuccess" event like so:
I then drill down into the e.response to get e.response.photoInfo and e.response.videoInfo and parse through them to split out the URLs and IDs and then use JQuerys .append method to append the objects to the document thus making them appear on the page without having to refresh the page.
The problem occurs when I try to do this in Opera. e.response is always null and I found that as an alternative you could use e.XMLHttpRequest.responseText but this is always "". (e.XMLHttpRequest also contains status and statusText). I can see the JSON object being pass properly in Fiddler but for some reason when it makes it to Opera it is emptied out. This works properly in all other modern browsers so this leads me to believe that it might be something to do with Opera.
Here is my setup:
OS: Windows 7 64-bit
Opera version 11.61 Build 1250
.NET 4
MVC 3
Thanks in advance for any assistance.
return Json(new { status = "OK", photoInfo = PhotoURLs, videoInfo = VideoURLs }, "text/plain");PhotoURLs and VIdeoURLs are strings of their respective URLs and IDs. I then attach a listener to the "onSuccess" event like so:
$(".uploadWrapper .t-upload").on("onSuccess", function (event, e) {I then drill down into the e.response to get e.response.photoInfo and e.response.videoInfo and parse through them to split out the URLs and IDs and then use JQuerys .append method to append the objects to the document thus making them appear on the page without having to refresh the page.
The problem occurs when I try to do this in Opera. e.response is always null and I found that as an alternative you could use e.XMLHttpRequest.responseText but this is always "". (e.XMLHttpRequest also contains status and statusText). I can see the JSON object being pass properly in Fiddler but for some reason when it makes it to Opera it is emptied out. This works properly in all other modern browsers so this leads me to believe that it might be something to do with Opera.
Here is my setup:
OS: Windows 7 64-bit
Opera version 11.61 Build 1250
.NET 4
MVC 3
Thanks in advance for any assistance.