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

Allow importing/exporting StoryMaps #304

Closed
binary-koan opened this issue Oct 3, 2016 · 14 comments
Closed

Allow importing/exporting StoryMaps #304

binary-koan opened this issue Oct 3, 2016 · 14 comments

Comments

@binary-koan
Copy link
Contributor

We've been thinking about this as a halfway point between having StoryMaps completely tied to one user and having full collaboration/sharing. Basically, you would be able to export a ZIP archive containing all the S3 files in the StoryMap plus a special metadata.json containing the database entry for the StoryMap. You could then import that archive into another user's account.

This would also allow people to make backups of their StoryMaps or host them themselves (probably not that valuable but might come in handy sometimes?)

What do you think?

@scott2b
Copy link
Member

scott2b commented Oct 4, 2016

There is a rudimentary import tool you can access as follows:

https://storymap.knightlab.com/select/?import_url=[your URL here]

Please take a look at that and evaluate how much this existing feature coincides with what you want to implement. The word I have from @JoeGermuska is:

"[Import] is a feature people need. I’d like to go through some design specs/sketches before implementing anything in code"

So I'm unsure yet about the logistics of getting this done. If you want to move forward with a better import tool than that mentioned above, I suggest maybe you could propose your idea of what this would be like so I can create some discussion points with the team here and we can move this forward in sync with the rest of storymap development.

Thanks!

@binary-koan
Copy link
Contributor Author

Thanks for finding that link - I noticed that feature but couldn't figure out how to get it to work.

My initial idea for exporting/importing via a zip file was something like:

storymapexportimport

As an alternative, the existing import functionality could be extended to be a more integrated part of the tool, along the lines of:

storymapexportimport2

In either case, the import dialog could be triggered from an "Import" button on the list of StoryMaps.

(I'm not sure what the wording on the dialogs should be, but hopefully you get the idea)

@scott2b
Copy link
Member

scott2b commented Oct 7, 2016

I like this. it is simple and is in a part of the UI that is unobtrusive. @JoeGermuska can we get a 👍 or 👎 on this?

@scott2b
Copy link
Member

scott2b commented Oct 7, 2016

Sorry, by "this" i mean the click-a-button to download a zipfile option. this seems simple to me. And right before it, an import section which is also just a button to select a zip or json file from the file system

@binary-koan
Copy link
Contributor Author

^ I implemented the ZIP import/export idea so that we can demo it here, but I'm still not sure if this is the best way to go so no pressure to accept it.

@rmiessle
Copy link

rmiessle commented Dec 4, 2018

Does the import URL feature still work? I am getting this error when I try:

Error loading storymap: Unexpected token < in JSON at position 0

@rmiessle
Copy link

rmiessle commented Dec 4, 2018

Does the import URL feature still work? I am getting this error when I try:

Error loading storymap: Unexpected token < in JSON at position 0

Nevermind, I figured out that I need to use the .json URL and it's working.

@PeppermintLeo
Copy link

Is there something wrong with the current import/export feature? After exporting my StoryMap and changing the folder into a zip file, I am unable to import it. I receive the following message "Error importing storymap: JSON Parse error: Unrecognized token '<'"

@JoeGermuska
Copy link
Member

I just tested it yesterday and it worked as expected. You shouldn't need to "change the folder into a ZIP file"; it should download as a ZIP file. If you don't have the exact ZIP file that was downloaded, it's possible that your process of re-zipping created something which is different in some way from the download, leading to a problem with the import.

If you're willing to provide your ZIP file for us, we can take a look. If you don't want to post a public URL to it, please send a note to support@knightlab.zendesk.com referencing this issue and including a link to somewhere we can download your reconstructed ZIP.

Unfortunately, the error you report is a case of bad error handling, since it's masking whatever the underlying issue is.

@PeppermintLeo
Copy link

When I click on export I'm given a folder with the name of my map and a number of files inside of it rather than a ZIP file.

@JoeGermuska
Copy link
Member

When I click on export I'm given a folder with the name of my map and a number of files inside of it rather than a ZIP file.

That's a consequence of your browser automatically expanding the ZIP file. If you're able to change the setting or use another browser, it might help. But in any case, if you can share the ZIP you tried to import, we can see if there are any obvious differences.

@PeppermintLeo
Copy link

Just before you sent this message, I tried using another browser and it worked seamlessly! Thank you so much for your quick replies and supporting this amazing tool!

@mdimera
Copy link

mdimera commented Apr 12, 2023

I'm having a similar issue today. I'm unable to import the zip file and just get an error message. Error importing storymap: error I've been careful not to unzip and rezip — it should be the original exported zip file.

I'm emailing a note to support@knightlab.zendesk.com with a link to the zip file in question.

@JoeGermuska
Copy link
Member

It turns out that @mdimera 's export file was larger than StoryMap will accept as an upload (the maximum upload size is 20MB).

In this case, it was partly because several versions of a file were uploaded, with the apparent intention of replacing previous versions, but StoryMapJS doesn't assume that, so several extraneous files were "bloating" the ZIP.

This is not to "blame" @mdimera by any means. We'll have to consider how we want to handle this, since the import/export feature is relatively new and not thoroughly tested.

A workaround is to remove excess files from an export and then re-zip the archive. If you do this, note that the export must be at the "root" of the ZIP file; if you zip the containing folder, StoryMapJS will report Error importing storymap: This doesn't look like a StoryMap exported package.

hope this is helpful for folks until a more graceful solution can be implemented.

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

6 participants