Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
9378c8ff
Commit
9378c8ff
authored
Jan 27, 2016
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11245 from edx/clytwynec/tnl-4040
Fix file upload in IE
parents
349b83f0
76c8e33d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lms/djangoapps/django_comment_client/base/views.py
+7
-3
No files found.
lms/djangoapps/django_comment_client/base/views.py
View file @
9378c8ff
import
functools
import
logging
import
json
import
random
import
time
import
urlparse
...
...
@@ -7,7 +8,7 @@ import urlparse
from
django.contrib.auth.decorators
import
login_required
from
django.contrib.auth.models
import
User
from
django.core
import
exceptions
from
django.http
import
Http404
,
HttpResponseBadRequest
from
django.http
import
Http404
,
HttpResponseBadRequest
,
HttpResponse
from
django.utils.translation
import
ugettext
as
_
from
django.views.decorators
import
csrf
from
django.views.decorators.http
import
require_GET
,
require_POST
...
...
@@ -750,13 +751,16 @@ def upload(request, course_id): # ajax upload file to a question or answer
result
=
''
file_url
=
''
return
JsonResponse
({
# Using content-type of text/plain here instead of JSON because
# IE doesn't know how to handle the JSON response and prompts the
# user to save the JSON as a file instead of passing it to the callback.
return
HttpResponse
(
json
.
dumps
({
'result'
:
{
'msg'
:
result
,
'error'
:
error
,
'file_url'
:
file_url
,
}
})
})
,
content_type
=
"text/plain"
)
@require_GET
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment