Skip to content

Commit fbfa12a

Browse files
committed
fix upload size limit
1 parent d6a97f7 commit fbfa12a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/javascript/controllers/map/layers_controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export default class extends Controller {
1313
upload () {
1414
const fileInput = document.getElementById('fileInput')
1515
const file = fileInput.files[0]
16-
const fileSize = (file.size / 1024).toFixed(2)
16+
const fileSize = (file.size / 1024).toFixed(2) // in KB
1717

18-
if (fileSize > 100 && !file.type.startsWith('image/')) {
18+
if (fileSize > 1500 && !file.type.startsWith('image/')) {
1919
status('File exceeds 1.5MB. Please simplify it, for example with mapshaper.org', 'error', 'medium', 8000)
2020
return
2121
}

0 commit comments

Comments
 (0)