hotosm/tasking-manager

[BUG] Missing file size warning message during project creation

Opened this issue · 2 comments

Describe the bug
While uploading a geojson project boundary in the project creation step, no data loads on the map. There is no warning or nay indicative error message for the user and it is impossible to go beyond this step.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'tasks.hotosm.org'
  2. Make sure you have permissions to create a project on TM
  3. From manage section, choose to create a new project
  4. In the project area definiton step, choose to upload a file that is more 1 MB
  5. Nothing happens after choosing the file. If the step is successful project boundary from the file auto loads on view. However with these steps there is no change to map view and there is no error message for the user.

Expected behavior
A clear message on what went wrong with the upload - is it the file size or the content of the file?

Screenshots

file-size

Additional context

cc @manjitapandey @kaditya97 @prabinoid @royallsilwallz

For the envvar setting, it assumes the default:

export const MAX_FILESIZE = parseInt(process.env.REACT_APP_MAX_FILESIZE) || 1000000; // bytes

@royallsilwallz - something missing on the frontend then?

cc @manjitapandey