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

BAD BAD BAD ... -- bisweb dislikes something about something in a nii.gz "file" #127

Closed
yarikoptic opened this issue Aug 17, 2021 · 10 comments

Comments

@yarikoptic
Copy link
Contributor

https://bioimagesuiteweb.github.io/webapp/viewer.html?image=https://datasets.datalad.org/.git/tmp/blah.nii.gz on a copy of the file served from elsewhere works -- so it is not about content but either about failing to deduce extension (is content-disposition considered?) or something else since all the following do not work

Ideally -- all of them should work ;) but console says

image

@XeniosP
Copy link
Collaborator

XeniosP commented Aug 20, 2021

W.r.t. https://bioimagesuiteweb.github.io/webapp/viewer.html?image=https://dandiarchive.s3.amazonaws.com/blobs/472/10e/47210e31-7e86-4a9d-bcad-413825c4250a (direct link to the blob on S3 -- no extension),

BIS looks for a .gz extension to decide if to uncompress or not. If it does not find it, then it assumes that it is uncompressed and fails. I guess I can add a flag that if it fails uncompressed to then try to uncompress the file.

@yarikoptic
Copy link
Contributor Author

isn't there some JS equivalent of https://man7.org/linux/man-pages/man3/magic_getflags.3.html even if only for a few needed here "fingerprints" (well -- single one for -- gz). google lead me to https://github.com/mscdex/mmmagic .

You could also, in case of exception like this, just try to assume that it is compressed and try to uncompress without sensing -- what evil could happen?

@XeniosP
Copy link
Collaborator

XeniosP commented Aug 20, 2021

Try using the alphaapp -- I pushed a fix there.

https://bioimagesuiteweb.github.io/alphaapp/viewer.html

@XeniosP XeniosP closed this as completed Aug 20, 2021
@yarikoptic
Copy link
Contributor Author

how fast alphaapp grows into app? ;)

@XeniosP
Copy link
Collaborator

XeniosP commented Aug 20, 2021

Basically, the stupid solution. If it fails force gunzip and try again.

W.r.t. alphapp, usually we go alphaapp --> unstableapp --> webapp.

alphaapp is a playground

Once you test it and you are happy, I will move to unstableapp which despite the name stays like that for a while.

New "webapp" probably November/December.

Xenios

@yarikoptic
Copy link
Contributor Author

I think I am happier than before. is it ok to just link out to "unstableapp" until the winter comes? would allow for more testing etc ;)

@XeniosP
Copy link
Collaborator

XeniosP commented Aug 20, 2021

Done. It might take a few minutes before github updates the pages.

Xenios

@XeniosP
Copy link
Collaborator

XeniosP commented Aug 20, 2021

It is there, force the page to reload if you need to

https://bioimagesuiteweb.github.io/unstableapp/viewer.html

(You can tell if it is updated by the date in the bottom right corner on the status bar)

@yarikoptic
Copy link
Contributor Author

I meant, if it would be ok to link out to it from dandiarchive.org ;-) relevant draft pr: dandi/dandiarchive-legacy#849

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

2 participants