File uploading challenge with Blazor


After using or should I say testing my webapp on the daily, you realize what would be nice to have for a better user experience.
My NanisuruApp is  a ToDo list, but strictly for family use.
Future plan is to consolidate everything and anything I need into this WebApp.
I got file uploading as binary directly into the database working.
Now to work on thumbnails, and figuring out what to do with HEIC formats

The backend API is set to public on my Github, but this app is still on private.  I plan on sharing it for public after I add a few more tweaks and clean up the code a bit.

なにするアプリに機能を追加して行こう。ということで、身内専用のToDoアプリで完了済みのタスクに思い出用の画像を添付できるようにしたいということで、今日はMongoDBへBinaryとしてデータベースへ直接ファイルをアップロードするという荒い手を使って導入。サーバーへファイルをおいて、ファイルの場所をstringで保存するのが王道らしいけれど、超規模だし一応ScalabilityもMongoFSを使えば大きいファイルも何なりと扱えるらしい。
今日はファイルのアップと表示までかな。
HEICフォーマットはどうする?サムネール化が必要など課題は残る。
バックエンドAPIは一応Githubに公開はしているけれど、まだ追加や修正が必要。フロントエンドのアプリの方の公開はコードのクリーニングと追加したい機能がほぼ終わった段階にしようと思う。

Blazor webassembly’s PWA

I was going to start working on migrating my Blazor Webassembly App to .NET MAUI in order to use it more conveniently on my IOS device, but I totally forgot about the PWA feature.  Following the official and well documented microsoft’s guide allowed me to easily enable PWA on my app.
It’s working like magic!

ASP.NET Core Blazor Progressive Web Application (PWA)

今開発中、というより随時機能追加や微調整中のアプリを今後iPhoneで使うために.NET MAUIへのコード移行を考えていたけれど、Blazor WebassemblyはPWAという素晴らしい機能が使えるのを完全に忘れていた。
今日はマイクロソフトのオフィシャルサイトのドキュメントを見てちょいちょいコードをいじって無事携帯からアプリ画面経由でアプリを開くことに成功。
素晴らしい。Apple Developerの登録や、アプリの審査とか不要なので便利!

Working on my first Lofi track.


I had a sudden urge to create my very first Lofi track.
Lofi is my go-to music when it comes to concentrating on studies, or creative projects.
Going through numerous chords to see which one I want to stick with.
Mixing should be way easier compared to Trance, simply because of the difference in the number of tracks and sounds used.

勉強する時は大体youtubeで適当なLofiを探して流しながらやる。色んなジャンルで勉強を試みたけれど、結局低音メインのビートに落ち着いた。クラシカルよりも長時間集中できた。(個人的には)
で、初めてのLofiトラックを作ってみることに。いつものトランスと違って使っている音の数がはるかに少ないからミキシングとマスタリング作業が楽なはず。

Moved my main blog URL for a new btro.jp

I had my blog hosted on the root of btro.jp, but I decided to move it to /blog.
Made a super simple page at btro.jp which has all my “public” links on the internet.
btro.jpのトップページに趣味周りのリンクをまとめたかったので、ブログを/blogへ引っ越しして、新しいトップページを追加。デザインはやっつけ感あるけど、ミニマリスティックってことで。

Plans and fixes for Nanisuru Webapp.


I finished an unsatisfactory state of my webapp Nanisuru (ToDo), and already have some improvements and fixes I need to start working on.
Also excited for some new features which I have never implemented.  Should be a challenge, but good material to set new grounds.
Did some planning and brainstorming on how to approach my trello list today.

Some UI updates to my webapp

Been doing some small UI updates and code fixes for my Blazor WASM webapp.  I decided to maintain, and add more features while also preparing a adhoc private distribution of the IOS version using the .NET MAUI Blazor framework.  Most code should run as is, but stuff like local storage needs to be modified to fit IOS’s secure storage.

Blazor webassembly base path issues.

If you’re uploading your blazor wasm project on a subdirectory on your host, you have likely hit a problem where you had to edit the <base href> in wwwroot/index.html to adjust.  But after you do this, launching the project on your local machine turns up with a path problem.
I had to edit the base href parameter each time to test locally, but there’s a sweet fix for this thanks to this post

Simply replace <base href> in index.html with the below:

<base />
<script>
var path = window.location.pathname.split(‘/’);
var base = document.getElementsByTagName(‘base’)[0];
if (window.location.host.includes(‘localhost’)) {
base.setAttribute(‘href’, ‘/’);
} else if (path.length > 2) {
base.setAttribute(‘href’, ‘/’ + path[1] + ‘/’);
} else if (path[path.length – 1].length != 0) {
window.location.replace(window.location.origin + window.location.pathname + ‘/’ + window.location.search);
}
</script>

Screenshot taken in case link goes bad:

 

My recent pick of Trance.

This track is simple sounding, yet a beautiful piece.  Nice classic sounding with soothing vocals.

FEEL & Andrew Mirt & Alexandra Badoi – Our Love (Christopher Corrigan Remix)

Progress on my personal ToDo app

Last year I created a personal ToDo app using Xamarin, and released it privately.  This year, I wanted to experience Blazor.  I decided to re-code the backend API handling database CRUD functions and get my hands dirty with Blazor Webassembly.
I kept things simple as possible, yet tweaked some stuff around to get a better understanding of the code instead of watching/reading an article and just slapping the code on.
Interface is prototype-ish.  Figured I’ll get my app running and then update as I go.

Dones:
– Asp.net Backend API hosted and ready to go.
– JWT Token, and expiration/validity check in place.
– Secure token in localstorage.  (Decided to use localstorage, instead of httponly cookie this time around)

Todos:
– Add, Edit, Delete function.
– Archive page to browse past, completed ToDos.