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
64b1f2b7
Commit
64b1f2b7
authored
Sep 10, 2013
by
jkarni
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #904 from edx/jkarni/fix/textbook-upload
Fix element name conflict
parents
54343881
0acaaa88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
cms/djangoapps/contentstore/features/upload.py
+2
-2
cms/djangoapps/contentstore/views/assets.py
+2
-2
cms/templates/asset_index.html
+1
-1
No files found.
cms/djangoapps/contentstore/features/upload.py
View file @
64b1f2b7
...
...
@@ -26,7 +26,7 @@ def upload_file(_step, file_name):
#uploading the file itself
path
=
os
.
path
.
join
(
TEST_ROOT
,
'uploads/'
,
file_name
)
world
.
browser
.
execute_script
(
"$('input.file-input').css('display', 'block')"
)
world
.
browser
.
attach_file
(
'file
s[]
'
,
os
.
path
.
abspath
(
path
))
world
.
browser
.
attach_file
(
'file'
,
os
.
path
.
abspath
(
path
))
close_css
=
'a.close-button'
world
.
css_click
(
close_css
)
...
...
@@ -43,7 +43,7 @@ def upload_file(_step, files_string):
for
f
in
files
:
path
=
os
.
path
.
join
(
TEST_ROOT
,
'uploads/'
,
f
)
world
.
browser
.
execute_script
(
"$('input.file-input').css('display', 'block')"
)
world
.
browser
.
attach_file
(
'file
s[]
'
,
os
.
path
.
abspath
(
path
))
world
.
browser
.
attach_file
(
'file'
,
os
.
path
.
abspath
(
path
))
close_css
=
'a.close-button'
world
.
css_click
(
close_css
)
...
...
cms/djangoapps/contentstore/views/assets.py
View file @
64b1f2b7
...
...
@@ -149,14 +149,14 @@ def upload_asset(request, org, course, coursename):
logging
.
error
(
'Could not find course'
+
location
)
return
HttpResponseBadRequest
()
if
'file
s[]
'
not
in
request
.
FILES
:
if
'file'
not
in
request
.
FILES
:
return
HttpResponseBadRequest
()
# compute a 'filename' which is similar to the location formatting, we're
# using the 'filename' nomenclature since we're using a FileSystem paradigm
# here. We're just imposing the Location string formatting expectations to
# keep things a bit more consistent
upload_file
=
request
.
FILES
[
'file
s[]
'
]
upload_file
=
request
.
FILES
[
'file'
]
filename
=
upload_file
.
name
mime_type
=
upload_file
.
content_type
...
...
cms/templates/asset_index.html
View file @
64b1f2b7
...
...
@@ -130,7 +130,7 @@
<form
class=
"file-chooser"
action=
"${upload_asset_callback_url}"
method=
"post"
enctype=
"multipart/form-data"
>
<a
href=
"#"
class=
"choose-file-button"
>
${_("Choose File")}
</a>
<input
type=
"file"
class=
"file-input"
name=
"file
s[]
"
multiple
>
<input
type=
"file"
class=
"file-input"
name=
"file"
multiple
>
</form>
</div>
</div>
...
...
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