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

"Extension" use in "File path" and "Image file path" #9

Open
jstarpl opened this issue Sep 21, 2022 · 2 comments
Open

"Extension" use in "File path" and "Image file path" #9

jstarpl opened this issue Sep 21, 2022 · 2 comments

Comments

@jstarpl
Copy link
Member

jstarpl commented Sep 21, 2022

"File path" and "Image file path" both refer to a gddOptions.extensions property, that is an array that "Limit which files can be chosen by the user". The problem I see with that is that Web APIs (and some OS as well) generally don't rely on DOS-style "file name extensions" for restricting user file selection. I feel that GDD should follow Web API standards and use an array of MIME-types and MIME-type globs for limiting file types to be selected and expect the implementation to work out how to filter on those MIME-types.

In the case of Web apps (1) and Python (2) its free, Electron-based apps (3) would have to use a MIME-type database like mime-types if not using the Web API, same for C# MimeTypesMap - however it should be possible to interrogate OS mime-type database as well: (4) and (5)

@nytamin
Copy link
Member

nytamin commented Sep 22, 2022

I agree fully! I initially just added those in there as examples of what a GDD-Type could be.

We should definitely rework them

@didikunz
Copy link

While "File path" is of broader range (it can be anything) I would limit the "Image file path" to the most common image file types png, tiff, targa and maybe bmp or svg. If one needs something else he could use the standard "File path" with the corresponding mime type. That would make the implementation of a UI simpler when one only needs images.

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

No branches or pull requests

3 participants