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

Open a CSV via query parameters? #432

Closed
will-moore opened this issue Feb 13, 2025 · 5 comments
Closed

Open a CSV via query parameters? #432

will-moore opened this issue Feb 13, 2025 · 5 comments
Assignees

Comments

@will-moore
Copy link
Contributor

If I have a URL to a csv file, I would love to be able to open it directly in the app by going to something like:

e.g. https://bff.allencell.org/app?csv=http://localhost:8000/data/biofile_finder.csv

Is that already possible somehow?

Thanks

@SeanLeRoy
Copy link
Contributor

Hi Will! I haven't tested what you are suggesting explicitly with a local server - however BFF does support http & https resources that it has implicit access to (meaning no password auth). That is all to say that this should work out of box for you already. In the screenshot below that is where to input the URL you pasted, click return or the button at the end of the input to confirm and click the "LOAD button and it should render your CSV. You can then take the URL from the browser and send it off, reload, or do whatever and have BFF auto load it in, this is an example of what the BFF URL would look like: https://bff.allencell.org/app?source=%7B%22name%22%3A%22biofile_finder.csv+%282%2F13%2F2025+10%3A41%3A20+AM%29%22%2C%22type%22%3A%22csv%22%2C%22uri%22%3A%22http%3A%2F%2Flocalhost%3A8000%2Fdata%2Fbiofile_finder.csv%22%7D

If this doesn't work let me know.

Image

@SeanLeRoy SeanLeRoy self-assigned this Feb 13, 2025
@will-moore
Copy link
Contributor Author

Yes, it works entering the URL as you describe. I was just hoping for a simpler "human readable" URL that I could easily construct that would open the csv automatically. But I think it should work with creating the JSON and using that...

?source={"name":"biofile_finder.csv (2/13/2025 10:41:20 AM)","type":"csv","uri":"http://localhost:8000/data/biofile_finder.csv"}

I'll give it a go, thanks...

@will-moore
Copy link
Contributor Author

This is working fine for me

@BrianWhitneyAI
Copy link
Contributor

We have looked into improving the readability of our URLS. Unfortunately it would likely require an external service. See this ticket #221

@SeanLeRoy
Copy link
Contributor

I think we could add a simple addition to our query argument parser that just accepts a URL like you describe https://bff.allencell.org?url=https://my-data-server/my_file.csv. Created #436 to track this

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