csvShare.app: An app to store and share csv files

Hi,

I just wanted to share an early alpha version of an app I made with Anvil. It allows users to upload and store a csv file online, and to get a short link to the file and a QR code.

Feedback is welcome.

The background is that I often teach courses where I want the students to have access to csv files. I could use GitHub, Dropbox or Google Drive, but it has some drawbacks.

  • Auto-download not default
    I want a link to the csv that the students can use in R or Python. For instance, they should be able to write df = pd.read_csv(LINK). The link you get from GitHub and Google Drive are not like that. They give you links to ‘views’ of the file, not auto-download. Now, it is possible to modify the links to make them auto-download, but this introduces an extra complication that beginner students should not have to deal with. And the links are long!

  • Complex
    Academics who write articles and want to share their data should have an easy way of doing so. Unfortunately, not everybody know how to use GitHub and they may not want to register. An app like this could provide an easier option.

But mainly I just wanted to try out things. Maybe it is useful, maybe not so much. In any case it was fun to build it.

Here are some of my own lessons:

  • Simplify!
    There is always a tendency to try to add lots of features. In order to finish, I eventually had to throw a lot of this away. For instance, I wanted to allow the user to choose between two types of links for the file they upload. One ‘view’ link and another ‘download’ link. But then I had to explain the difference, and the business logic later on would depend on the choice - and many binary choices like that soon led to an exponential complexity. For instance, having some options as ‘paid’ options and some as ‘free’ was another complexity. The solution was often: Simplify! I dropped the ‘view’ option (since GitHub or Google Drive already has this), made it free and restricted the files to ‘csv’ and not all kinds of files.

  • Staff, Documentation, Forum (and Anvil) are great
    I got great help from lots of people. Connecting it to my own domain required some help, as did a bug in Blob media (that require encoding and binary files), and to solve some of my own misunderstandings (believing that an Image could be sent to a server function as an URLMedia object). I could never have built someting like this without help, and not at all if I had to learn Jacascript, back-end development/integration, deployment at the same time. Thanks!

  • Custom components
    There are some great custom components presented in different places. The drag-and-drop file loader, for instance (Thanks!). I also missed a richer text element (that allowed markup), and found two. And a script to copy text to the clipboard (great!). More of these deserve to be collected in one place and perhaps given more prominence and an even simpler way to add them to a project.

7 Likes

Hi @hans.melberg - really good to hear about your successes and learnings. If you get a minute would you be kind enough to add links to the Custom Components articles you mention in the final paragraph? Thanks for sharing!

2 Likes

Good idea!

Drag and drop box for file loader
See the last post in this thread: https://anvil.works/forum/t/file-upload-w-drag-drop/1883/8 (@shaun)

Copy to clipboard
I used @mattstibbs code in this thread: https://anvil.works/forum/t/copy-to-clipboard-button/1817/9

Markdown
There are several options:
https://anvil.works/forum/t/seeking-a-rich-text-display/64/13 (@shaun, @david.wylie)
https://anvil.works/forum/t/example-of-multiple-quill-js-editors/3700 (@mcmasty)
https://anvil.works/forum/t/allow-user-to-simple-format-textarea-bold-italic-list-link/4174 (@joinlook)

but I - first - ended up writing some documentation in goodle doc, using an extension to covert it to HTML/Markdown and insert it in a Custom HTML form. However, even this was quite clunky and in the end I just made a new form with labels and TextArea components for the About & Documentation section. Maybe a richer standard text component that allows markdown could be useful?

Feel free to add useful components. We could make a long list!

2 Likes

Here is the last version of the app in case anyone wants to see it online: https://csvshare.app/

2 Likes