Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to upload image handouts #254

Merged
merged 5 commits into from
Jul 13, 2017

Conversation

wowkalucky
Copy link
Collaborator

Small fix to allow uploading images as handouts. Size limit is still 300Kb.

@wowkalucky wowkalucky requested a review from z4y4ts July 11, 2017 14:56
@codecov
Copy link

codecov bot commented Jul 11, 2017

Codecov Report

Merging #254 into dev will increase coverage by 0.06%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #254      +/-   ##
==========================================
+ Coverage   85.08%   85.15%   +0.06%     
==========================================
  Files          41       41              
  Lines        2548     2560      +12     
  Branches       26       26              
==========================================
+ Hits         2168     2180      +12     
  Misses        379      379              
  Partials        1        1
Flag Coverage Δ
#acceptance 88.88% <ø> (ø) ⬆️
#unit 83.32% <93.33%> (+0.07%) ⬆️
Impacted Files Coverage Δ
.../spec/studio-edit/transcript-manual-upload-spec.js 100% <100%> (ø) ⬆️
...static/js/studio-edit/transcripts-manual-upload.js 28.48% <85.71%> (+2.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b299d96...a7e31e4. Read the comment docs.

@@ -240,11 +240,14 @@ function createTranscriptBlock(langCode, langLabel, transcriptsValue, downloadTr
*/
function clickUploader(event, $fileUploader) {
'use strict';
var handoutsAllowedFileTypes = '.png, .jpeg, .jpg, .gif, .tiff';
Copy link

@z4y4ts z4y4ts Jul 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check what types stock open edx video xmodule supports.
I'm certain this list should include .pdf, and maybe some more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@z4y4ts z4y4ts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cover it with unit tests and it's good to go!

@wowkalucky wowkalucky merged commit 13ff123 into dev Jul 13, 2017
@wowkalucky wowkalucky deleted the 227-1-couldnt-upload-image-handout branch July 13, 2017 12:51
wowkalucky added a commit that referenced this pull request Aug 3, 2017
* Add ability to upload image handouts

* Extend handouts allowed file types list

* Refactor uploading file extension check, cover it with unittests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants