mirror of
https://github.com/sismics/docs.git
synced 2024-12-25 12:43:49 +01:00
File data cache header, alert with file count on document added
This commit is contained in:
parent
f25faad262
commit
210f0dcc27
@ -1,7 +1,6 @@
|
||||
- Reordering files (server)
|
||||
- Autocomplete on document title (client/server)
|
||||
- Cache headers on /file/:id/data (server)
|
||||
- List opened sessions and ability to close them (client/server)
|
||||
- Display logs (client)
|
||||
- Users administration (client)
|
||||
- Reordering files and add new files to the end (server)
|
||||
- Tag stats (client/server)
|
||||
- List opened sessions and ability to close them (client/server)
|
||||
- Users administration (client)
|
@ -4,7 +4,9 @@ import java.io.BufferedInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.NoResultException;
|
||||
@ -252,6 +254,7 @@ public class FileResource extends BaseResource {
|
||||
|
||||
return Response.ok(storedfile)
|
||||
.header("Content-Type", file.getMimeType())
|
||||
.header("Expires", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z").format(new Date().getTime() + 3600000 * 24 * 7))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
BIN
docs-web/src/main/webapp/favicon.png
Normal file
BIN
docs-web/src/main/webapp/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -3,7 +3,8 @@
|
||||
<head>
|
||||
<title>Sismics Docs</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="shortcut icon" href="favicon.png" />
|
||||
<link rel="stylesheet" href="style/bootstrap.css" type="text/css" />
|
||||
<link rel="stylesheet/less" href="style/main.less" type="text/css" />
|
||||
<script>
|
||||
|
@ -66,10 +66,14 @@ App.controller('DocumentEdit', function($scope, $q, $http, $state, $stateParams,
|
||||
$scope.pageDocuments();
|
||||
$state.transitionTo('document.view', { id: $stateParams.id });
|
||||
} else {
|
||||
var fileUploadCount = _.size($scope.newFiles);
|
||||
$scope.alerts.unshift({
|
||||
type: 'success',
|
||||
msg: 'Document successfully added (with ' + fileUploadCount + ' file' + (fileUploadCount > 1 ? 's' : '') + ')'
|
||||
});
|
||||
$scope.document = { tags: [] };
|
||||
$scope.newFiles = [];
|
||||
$scope.loadDocuments();
|
||||
$scope.alerts.push({ type: 'success', msg: 'Document successfully added' });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user