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

Uploading unsupported mime type files from the browser #61

Closed
waridrox opened this issue Aug 20, 2021 · 8 comments
Closed

Uploading unsupported mime type files from the browser #61

waridrox opened this issue Aug 20, 2021 · 8 comments

Comments

@waridrox
Copy link
Member

waridrox commented Aug 20, 2021

The params for uploading file types in the GCBM runs requires specific file types to be uploaded that are unsupported via the MIME standards in the browser. Some of these are .db, .cfg, .conf etc. Here's the list for the supported file types in the browser - https://www.iana.org/assignments/media-types/media-types.xhtml

This is how the file types are getting referenced in the file uploader -

accepted-file-types="image/tiff, image/x-tiff, application/json, application/x-geotiff, application/gml+xml, application/x-wms, text/xml, "

The closest thing that may be possible now is the .zip file type which would be sent to the upload route and unzipped there...

CC: @aornugent @shubhamkarande13 @HarshCasper

@waridrox waridrox changed the title Thoughts on uploading unsupported mime type files from the browser Uploading unsupported mime type files from the browser Aug 20, 2021
@Tlazypanda
Copy link

Hey @waridrox @shubhamkarande13 can you share the entire api call that is being made? The upload requests are made with Content-Type: multipart/form-data so can you share the exact error log for the same? Thanks ✌️

@waridrox
Copy link
Member Author

Hi @Tlazypanda, the api calls are yet to be made in the multipart/form-data part, but before that we would like the user to upload the dataset files as per their requirements from the web browser. Hence the file upload component needs a specific file type to accept the files from the browser...

upload-gcbm.mov

@Tlazypanda
Copy link

Hey @waridrox I am not sure what change is required on the api end now because if I understand correctly this is on the UI level the file upload component right? If we finally make the api request to multipart/form-data this would be working then ✌️

@waridrox
Copy link
Member Author

waridrox commented Aug 20, 2021 via email

@aornugent
Copy link
Collaborator

Oh that's disappointing! How about we proceed with a zip upload while we work towards a minimum viable product but leave this discussion open for further consideration?

This might mean users are not able to edit the config using the UI until we resolve this issue.

@shubhamkarande13
Copy link
Member

@aornugent Don't worry I have found an alternative component that doesn't restrict uploads on file type or mime type.
Tada 🎉! Dropzone!

image

It looks a bit ugly but can I push the code to this branch till Warid fixes the design when he wakes up (it's 5 AM here)?

@shubhamkarande13
Copy link
Member

@aornugent @waridrox @Tlazypanda
Upload works!

image

Thank you Sneha for your insights! ✌😄

@waridrox
Copy link
Member Author

Thanks for everyone's insights, the file upload component that was being used proved to be the limitation instead.

Closing this via #64

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