Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File size limit #67

Open
1stgongsin opened this issue Feb 25, 2019 · 6 comments
Open

File size limit #67

1stgongsin opened this issue Feb 25, 2019 · 6 comments

Comments

@1stgongsin
Copy link

Input file size limit is now 1024kb
In the leaflet.filelayer.js file, I change this value(1024) to 9999, but limit didn't change.
Is it impossible to change upper limit of gpx(kml) file size?

@leplatrem
Copy link
Collaborator

I don't remember the history of this option... but fileSizeLimit is defined twice in the source file, so maybe you forgot once. And a priori it's an option, so shouldn't have to modify the lib file.

@1stgongsin
Copy link
Author

Thank for reply, leplatrem.
Over 1Mbytes gpx or kml file does not appear on the map.
i think togeojson.js can't process over 1Mbytes size of gpx or kml.

@leplatrem
Copy link
Collaborator

i think togeojson.js can't process over 1Mbytes size of gpx or kml.

I doubt it.

Any error in the browser console?

@johnd0e
Copy link

johnd0e commented Mar 29, 2019

but fileSizeLimit is defined twice in the source file,

The second is excessive (IMHO better remove it from FileLayerLoad defaults).

In the leaflet.filelayer.js file, I change this value(1024) to 9999

You should not change source, as the value can be specified in options.

var control = L.Control.fileLayerLoad({ fileSizeLimit: 2048 })

And it works, I've just checked it myself.

@a-lurker
Copy link

a-lurker commented Jul 7, 2019

Great plugin. Had a couple of problems initially. Tried out the demo and a lot of my files didn't show. Started to wonder if the plugin was any good. Had a look in the console - no error messages.

Turns out a lot of my gpx files were over 1024 kb. After messing around, the documentation gave the much needed clue.

Would like to see:

  1. The default 1024 kb raised to 2048 kb. I can load 20 files greater than 1mb each and have no problems. There is no max file count so you could still exceed some practical limit. May be a max data amount is needed rather than the 1024kb limit per file. ie load all files and stop loading when the file(s) total amount exceeds say 50mb?
  2. An option that writes anything that goes to data:error (error) to the console. Default to enabled. User can then choose to turn console logging off. That would immediately show why larger files are not processed. Would have saved me a lot of time.

Thanks once again for the effort.

@leplatrem
Copy link
Collaborator

Please, don't hesitate to open pull-requests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants