Skip to content

Instantly share code, notes, and snippets.

@MOTOO11
MOTOO11 / gist:5170148
Last active December 14, 2015 23:59
Get file with original name example.
@Get("/content/{originalName}")
public static void getContent(String originalName) {
//アップロードされた際にオリジナル名を保存しておく
//異なるアップロード者間で同じファイル名を用いている事が考えられるので保持者も含めて検索
Content c = Content.findByOwnerAndName(originalName);
notFoundIfNull(c);
byte[] cachedContent = Cache.get("CONTENT_" + c.id,byte[].class);
if(cachedContent!=null){
response.contentType = c.mime;
renderBinary(new ByteArrayInputStream(cachedContent));
@MOTOO11
MOTOO11 / footer.html
Last active January 2, 2016 14:39
この方がそれぞれのファイル内でタグが閉じているので、編集しやすいんじゃないかなと思います。 ただ、内部の文字列連結順を変える必要があると思います。
body {
background-color: rgba(0, 0, 0, 0);
overflow:hidden;
color:white;
text-shadow:
-1px -1px #0000ff,
1px -1px #0000ff,
-1px 1px #0000ff,
1px 1px #0000ff;
}
@MOTOO11
MOTOO11 / test
Created December 28, 2022 15:05
2222
33333