Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit e680e25

Browse files
committed
add pdf field
1 parent 315e343 commit e680e25

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

admin/app/fields/pdf.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { mediaLibrary } from '../settings/media-library.js';
2+
let maxFileSize = 2000000;
3+
if (mediaLibrary) {
4+
maxFileSize = 5000000;
5+
}
6+
7+
export const pdf = {
8+
name: 'file',
9+
label: 'PDF',
10+
widget: 'file',
11+
required: false,
12+
i18n: 'duplicate',
13+
choose_url: false,
14+
media_library: {
15+
config: {
16+
max_file_size: maxFileSize
17+
}
18+
},
19+
media_folder: '/static/pdf',
20+
public_folder: '/pdf'
21+
};

0 commit comments

Comments
 (0)