Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
218584dc
Verified
Commit
218584dc
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into f-one-time-tokens
parents
cd4c22e9
6e8b8efe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/caosdb/server/resource/SharedFileResource.java
+6
-1
6 additions, 1 deletion
src/main/java/caosdb/server/resource/SharedFileResource.java
with
6 additions
and
1 deletion
src/main/java/caosdb/server/resource/SharedFileResource.java
+
6
−
1
View file @
218584dc
...
@@ -71,7 +71,12 @@ public class SharedFileResource extends AbstractCaosDBServerResource {
...
@@ -71,7 +71,12 @@ public class SharedFileResource extends AbstractCaosDBServerResource {
final
MediaType
mt
=
MediaType
.
valueOf
(
FileUtils
.
getMimeType
(
file
));
final
MediaType
mt
=
MediaType
.
valueOf
(
FileUtils
.
getMimeType
(
file
));
final
FileRepresentation
ret
=
new
FileRepresentation
(
file
,
mt
);
final
FileRepresentation
ret
=
new
FileRepresentation
(
file
,
mt
);
ret
.
setDisposition
(
new
Disposition
(
Disposition
.
TYPE_ATTACHMENT
));
// HTML files should be opened in the browser.
// Any other media type than HTML is attached for download.
if
(!
MediaType
.
TEXT_HTML
.
includes
(
mt
))
{
ret
.
setDisposition
(
new
Disposition
(
Disposition
.
TYPE_ATTACHMENT
));
}
return
ret
;
return
ret
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment