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

Possibility to upload GPX files. #305

Open
Profi420 opened this issue Jan 16, 2022 · 7 comments
Open

Possibility to upload GPX files. #305

Profi420 opened this issue Jan 16, 2022 · 7 comments

Comments

@Profi420
Copy link

Profi420 commented Jan 16, 2022

Feature Request

Is your feature request related to a problem? Please describe.
Is it a feature? I dont know. We would like to upload GPX Files so pls unban this format.

Describe the solution you'd like
It would be amazing if we could upload .gpx files to flaurum.

@clarkwinkelmann
Copy link
Member

Can you please fill in the fields of the GitHub issue template?

The extension should support all file types. Does the file has a recognized MIME type? What values did you try? Does it work when you allow any application/octet-stream?

@Profi420 Profi420 changed the title Please let add *GPX Files. Possibility to upload GPX files. Jan 22, 2022
@Profi420
Copy link
Author

hi! i have updated the form. i hope you know now what we would like :-)
THX

@clarkwinkelmann
Copy link
Member

What happens when you try?

The only format that's banned is PHP files. All other files should be whitelistable via their mime type.

@JeromeGillard
Copy link

GPX files can be uploaded and previewed with this new extension: https://github.com/JeromeGillard/flarum-map

Follow the README over there but basically:

  • Add ^application\/.*(gpx|json|xml|geojson|geo.json) mime type upload adapter mapping.
  • Select Map as template.
  • Then add gpx,json,geojson extensions to the "User-provided file extension" below.

@luceos
Copy link
Contributor

luceos commented Oct 12, 2022

So you could actually upload files of type GPX, but you wanted them to be rendered differently?

@JeromeGillard
Copy link

Out of the box fof/upload can accept .gpx files, but mime type is recognized as application/xml.
We can upload them but, if rendered from bbcode, the file is displayed for download as <original_file_name>.xml (not .gpx).

To solve that, add gpx extension to the "User-provided file extension" settings field. The file's extension will not be renamed.

I use JeromeGillard/flarum-map to render .gpx files on a map widget, that seem to be an additional feature, maybe out of scope of this issue.

@eddiewebb
Copy link

Checkout https://github.com/eddiewebb/flarum-gpx-preview which is a template to render Google Maps of uploaded GPX files.

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

5 participants