CatalogueOfLife / checklistbank

UI for checklistbank.org
https://www.checklistbank.org/
7 stars 2 forks source link

TextTree upload fails with missing content type #1329

Closed mdoering closed 9 months ago

mdoering commented 10 months ago

When you upload a TextTree file with the suffix .txtree the uploader does not set any content type and the API returns a 400 bad request. Set the Content Type for all possible text tree files to text/plain:

thomasstjerne commented 9 months ago

I can´t reproduce it. The content type is set correctly here regardless of file extensions: https://github.com/CatalogueOfLife/checklistbank/blob/c1421d2006fb4aecad7b14d91ff9a3e42c941896/src/components/TextTreeUpload.js#L38

mdoering commented 9 months ago

And can you upload the files with any of the 3 extensions?

mdoering commented 9 months ago

Uploading works now. But when I paste this snippet which I had downloaded before it doesn't do anything. I suppose there is some import error which gets swallen?

Animalia2 [kingdom]
  Arthropoda [phylum]
    Hexapoda [subphylum]
      Insecta [class]
        Pterygota [subclass]
          Coleoptera [order]
            Adephaga [suborder]
              Caraboidea [superfamily]
                Carabidae Latreille, 1802 [family]
                  Pterostichinae Bonelli, 1810 [subfamily]
                    Pterostichini Bonelli, 1810 [tribe]
                      Pterostichina Bonelli, 1810 [subtribe]
                        Abax Bonelli, 1810 [genus]
                          Abax (Abacopercus) Ganglbauer, 1891 [subgenus]
                            Abax (Abacopercus) schueppeli Palliardi, 1825 [species]
                              Abax schueppeli biharicus Maran, 1955 [subspecies]
                          Abax (Abax) Bonelli, 1810 [subgenus]
                            Abax (Abax) parallelepipedus (Piller & Mitterpacher, 1783) [species]
                              Abax parallelepipedus alpigradus Schauberger, 1927 [subspecies]
                              Abax parallelepipedus parallelepipedus (Piller & Mitterpacher, 1783) [subspecies]
mdoering commented 9 months ago

Ah, no. There is still the submit AND the Ok button. I did not submit, just hit ok. Why are there 2 buttons? See https://github.com/CatalogueOfLife/checklistbank/issues/1327

thomasstjerne commented 9 months ago

Needs a deployment