Commit ce63808
committed
be explicit about inline vs. download in safe files redirect
if we're redirecting to safe files and it's not for download, it's for
inline and we need to include that in the redirect url. also, be
explicit about wanting to download when clicking a link labeled
"Download".
fixes #5433
test-plan:
- have s3 storage enabled and a safe files domain
- upload an image as a file submission
- view the submission in speedgrader; image should be displayed
inline rather than being downloaded
- upload an image on the files tab
- click the download link; should download the image rather than
being shown in browser
- preview the uploaded image from the files tab; it should display
inline
- upload a flash file on the files tab
- preview the uploaded image from the files tab; it should display
inline (independent check necessary because flash is touchy about
content-disposition headers)
- click the download link; should download the file rather than
being shown in browser
Change-Id: Ibd48eb4629aa26052d3d1bce90444146033b9eeb
Reviewed-on: https://gerrit.instructure.com/8275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>1 parent b97f204 commit ce63808
3 files changed
Lines changed: 61 additions & 2 deletions
File tree
- app
- controllers
- views/files
- spec/controllers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
994 | 1002 | | |
995 | 1003 | | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
996 | 1008 | | |
997 | 1009 | | |
998 | 1010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
45 | 92 | | |
46 | 93 | | |
47 | 94 | | |
0 commit comments