I wanted to create a user focused app that leverages the development environment I've built in previous tutorials. To that purpose the idea was to create an app that allows an user to upload images to IPFS and create a gallery that can be shared.
You can find the tutorial here and a version of the app hosted on html here.
I'd say in the end this worked out well. I ended up not using some elements of the development environment that I planned to, but it made more sense to do it that way.
The idea took shape very organically. Some of the decisions, like keeping images on the client side until publishing the gallery, serendipitously also allowed a final version of the app to be publisable over http!
I sketched the outline for the tutorial and then developed the application in a way to fit the outline -> ie. interface first, then interaction and then saving to IPFS.
Some reflection on the process:
There are several interface improvements that can be done - deleting photos in a gallery, reordering photos, improving the layout, etc.
I ran into an issue when I uploaded a folder containing a space - ie "folder 1". The upload work, but when doing a request like ?noResolve request, I got a 500 response. Here is a minimal example to trigger the error:
let file = new File(['a'], 'folder 1/file1.txt')
let formData = new FormData()
formData.append('file', file)
let resp = await fetch('ipfs://bafyaabakaieac/', {method: 'put', body: formData})
const newCid = new URL(resp.headers.get('location')).origin
resp = await fetch(newCid + '/folder 1/' + '?noResolve')
I really enjoyed creating this application and I feel even though the gallery is minimal, it is both useable and useful!