Skip to content

Commit 3dfcf29

Browse files
paulgalowjayair
authored andcommitted
Replacing static file size with a dynamic lookup (#38)
1 parent 73ce28a commit 3dfcf29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/containers/NewNote.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default class NewNote extends Component {
4242
event.preventDefault();
4343

4444
if (this.file && this.file.size > config.MAX_ATTACHMENT_SIZE) {
45-
alert("Please pick a file smaller than 5MB");
45+
alert(`Please pick a file smaller than ${config.MAX_ATTACHMENT_SIZE/1000000} MB.`);
4646
return;
4747
}
4848

src/containers/Notes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class Notes extends Component {
7979
event.preventDefault();
8080

8181
if (this.file && this.file.size > config.MAX_ATTACHMENT_SIZE) {
82-
alert("Please pick a file smaller than 5MB");
82+
alert(`Please pick a file smaller than ${config.MAX_ATTACHMENT_SIZE/1000000} MB.`);
8383
return;
8484
}
8585

0 commit comments

Comments
 (0)