KendoUI upload not working in IE9 - kendo-ui

I am using Kendoui upload control (Async mode) in my asp.net application.I am able to successfully upload file using Google chrome,Firefox and IE10 but in IE9 ,upload event fires and file uploads successfully but success event of kendo upload does not fire and it always goes to error event.
kendo upload make ajax call to asp.net apiController where I have written sub which does not return anything.
I get response with 204 code which shows no content.I tried to return json as response but still in that case success event of kendoui upload does not fire.
below are the urls of screenshots my response header and body.
http://screencast.com/t/0KQ0KF9mC
http://screencast.com/t/tCAC1JJ6No59
Please help me.
Regards
Imran

It's been a while, so you may have solved this already, but I had the same problem and the solution was simple:
Set the response header content-type to 'text/html'

Related

Django - download file without reloading the page

The flow looks like that:
user is filling the form
form is passed to the server by ajax
form is saved to db, then the pdf with the form data is created and saved in the app folder (probably a bad move here...)
ajax success causes the page to append a button 'Download' with value equal to current pdf's name so button 'Download' appears to the user
If user presses the button the very pdf that was just saved is gonna download.
Refreshing the page makes the button disappear.
I've got stuck on point 5. I have created another ajax (to avoid reloading the page) bound to the Download button. It correctly asks the server to look for the file, creates a django File object: pdf_file = File(open(file_path, 'rb'))
and creates a HttpResponse with file, and content_type='application/pdf' or 'application/download'.
response['Content-Disposition'] is attachment.
Then the ajax returns response - only it does not. Server raises no error but ajax error function is called.
I've read that downloading with ajax is not possible. Could you help me a bit to get it straight? If above snippets are not clear, I shall provide more code.
Python 3.5, Django 1.10
Do like
window.location.href = "/url/to/downloadfile/"
in javascript after success of posting form. OR
#html
<button onclick="myfiledownload()">Download</download>
#javascript
function myfiledownload(){
window.location.href = "/url/to/downloadfile/"
}
Instead of using ajax to download the file bind the button to a download link where the file may be hosted
https://www.mywebsite/download/?fileid=3247023
You should at least seperate your file in a media root
Note: in production you will have to use a cdn to host your static files

Windows Store App WebView Ajax request from local html file

I have a question similar to this WebView Windows Store App C# Ajax Not Working
I am loading a local html file onto WebView using :
webView.NavigateToLocalStreamUri(pageUri, localUriResolver_);
I am trying to make a ajax call to remote server. I am getting an error with status=0.
I tried with both jquery and plain XmlHttpRequest, results are same. I am not able to get remote file content.
At the same time, I am able to load local file. As all local files are redirected to my "localUriResolver", i am able to resolve the url and provide the content to ajax call.
Coming to remote content, I know this is cross domain request issue.
Is there a way to get around it on Windows 8.1 WebView. Is there some flag to override the cross-domain origin policy.
Thanks
I believe I am running into the same issue right now. It would appear as though my ajax request is not completing.
I see that our API is hit on our server but the complete callback of my jQuery ajax request is never triggered.
Currently investigating why, please update this if you've found a work around or solution.

How to upload a file using Ajax request in rails 2.3

I have a rails 2.3 application.
I am using Ajax request to submit the form content. In my form, I have a provision to upload files.
Issue with the form is, if I added a file to the form and submitted the form content, I am getting an error "Error: NS_ERROR_XPC_BAD_OP_ON_WN_PROTO: Illegal operation on WrappedNative prototype object Source" in "jquery-1.4.4.min.js" file and the form is submitting normally without using ajax request. But, the form is submitting form content using Ajax when there is no file selected to upload.
Can anyone please tell me how to upload file using Ajax request.
I found a solution for my above mentioned requirement at the following url. Hope it may help some one.
http://priyanka-railsdeveloper.blogspot.in/2011/11/allow-ajax-upload.html

How to use ajax post on webmatrix webimage helper especially in webimage.getImagerequest()

I've been trying to use the webimage helper in webmatrix to upload an image using ajax but its not clear to me how i can pass data to the webimage.getImageRequest("Image") method from the ajax post.This helper seems to retrieve its file upload data from the browser when the page form is posted.For me, i dont want to refresh the form...I just want ajax to handle process
The issue here isn't the WebHelper - uploaded files are not posted with ajax requests:
How can I upload files asynchronously?
So you're probably getting a file name, but no content. That thread above shows a few work arounds that should work fine with the WebHelper. I've also had pretty good luck with uploadify:
http://www.uploadify.com/
Happy Coding!

wp-load.php not found - 404 - Buddypress & Ajax

I'm having an issue with Buddypress ajax calls. The calls themselves are being made, however it's on the callback i'm having problems. I'm using a custom theme, with some custom pages for buddy press. All the same javascript files are loaded and the ajaxurl is defined as normal.
When i interact with anything in Buddpress (favourite, post message, comment etc) I get a 404 on wp-load.php in console. The content is there. The ajax function works itself as if you refresh the page the content is updated.
Tried a few things to fix up but getting nowhere.
After agonising on this for a while, there was a simple fix which i placed in the Ajax.php file.
status_header( 200 );

Resources