The code now removes the old thumbnail file, stores the new one and
updates the database entry. I found it easier to keep track of the
changes whilst developing by doing this.
I added a new route to get files from the /archive directory but
needed to expand on the original /storage/view/:slug route so I could
seperate out the two (/storage/media and /storage/archive)
directories.
I added a check to make sure the archive entry
requested (/edit/archive/:slug) exists and return a 404 if it doesn't.
This is part of an end-of-session commit. I'm currently working on the
/create/archive-entry section (most the HTTP POST request). I still
need to start the view archive, edit archive and delete archive
parts. I've not even looked at the Meilisearch stuff. For now, the aim
is to get the website's main database (nera.db) working and then
integrate the Meilisearch stuff in after that.
When uploading a file, a thumbnail is made (if an image, using the
Image Magick program with Bash). This file is not stored in the
database. It is a file-system only thing. The reason for adding this
is some I can create HTML templates/defroutes which show a list of the
images in /storage/media without saturating the viewers bandwidth.
I need to work on this functionality a bit more. This is an end of
session commit. Started it and it works but needs expanding.
I could do with adding file-type checks and changing 'octet/stream' to
something like 'image/png' depending on the file-type (storage in
DB). This will stop the browser from downloading every file in
/storage/media and allow the files which can be viewed in the
browser (like images).
This is an end-of-session commit. I've got the route up and running
with the /user/storage HTML template rendering in the browser and
listing out the files in storage. I could do with adding a model and
storing the files meta-data in the database. This page could do with
rendering the images and placeholders (E.G.generic text file icon) for
non-image files.
This is work-in-progress for the site-settings section of the
website. These additional features in this commit focus on setting
home page and enabling/disabling the sign-up features.
Just an extra check in amongst what's already there. If the username
the new sign-up attempt has entered matched one already in the
database, a message is relayed stating as much and redirects back to
the sign-up page.
The update part refers to the redirect when a database is found whilst
making a HTTP POST request, as part of the init-db
process (A.K.A. website's first run procedure).
The auth to nera change is because I didn't catch all of the moves in
a previous commit. The image I was running at the time still had the
auth version so it wasn't showing any errors. I spotted this one when
trying to run a new image.
The web package was already using code from some of these
packages. This commit moves some of the code in the web package into
one of the various referenced packages and also has 'web' utilise the
new features in those pacakges also.
The biggest shift is in how the alert-messages are handled (store in
ningle:*session* across HTTP requests) and how auth. is handled --
mostly the redirects functionality.
https://github.com/vindarel/cl-cookieweb (for GitHub Repo. and
instructions).
The reason for using this is because it makes it easier to run the
website as a standalone thing. You don't need to link it up to
Quicklisp's /local-project directory. It has scripts to help you build
the binaries and to run the website (as a standalone) thing. I, also,
hadn't use this 'cookie cutter' program before so it's a good time to
get my feet wet.
I'm going to try this with Python and Django first. Because it's not
my personal project, it might be better to use a language which is
more mainstream. It should reduce the 'Bus Factor'.