-
Notifications
You must be signed in to change notification settings - Fork 56
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
Is there a way to load the .ged directly from the server ? #151
Comments
I'm not sure what you're trying to achieve. To load data directly from a URL, you can construct a URL like this: Topola by default uses a CORS proxy to load files because most web servers have CORS turned on. To turn off this behavior and load files directly from the web server, add You can also have a look at https://github.com/develancer/topola-webpack for a way to create a self-contained package together with a GEDCOM file. |
The idea is to only display the tree under embedded mode at the first load (without giving the option for the user to load other tree). And privacy reasons not provide or display the loaded ged file publicly. Hence the question to directly load it from the host itself: The app would load a ged directly and display the tree. Skipping your intro page. Note that I have tried the webpack repo and used your embedded sample repository but the first one didn't include a search & export option and the second is not the most efficient on modern browsers. In both case the ged is loaded from public urls... Do you mind giving me some clues on the functions I should look at? I'd be happy to contribute once I get a final version. (Great job by the way) |
Hi. |
I was looking for something similar. I think the UI you are looking for is what is rendered at a URL like The goal would be to override the contents of the loaded file to point to a relative path on the web server, likely around here: topola-viewer/src/datasource/embedded.ts Lines 53 to 63 in ceee39d
Granted, this is still a static/client-side website, so people could find the file path/contents in the page source anyhow. But it would still be useful for distribution of a simpler landing URL. My solution so far is a simple landing page to wrap the longer URL and prevent most people from "breaking" it:
|
Hello @hayoul , |
I am trying to load the GEDECOM file directly from the backend and not sure what function loads the file and how to hardcode the function or any variable to load file itself without passing any parameters in the URL or using the load file options. Can you help?
Bonus how would that load the file once the app is loaded and bypass the intro page?
The text was updated successfully, but these errors were encountered: