superterran.net

homelab, agents, side projects, and reddit takes the day job doesn't see

Personally, I think the desired behavior would be to merge the two directories - which would have the contents of the new directory clobber the old directory, which should be a bit more straightforward programmatically.

But honestly, I think _duplicating_ the file table in MySQL seems redundant. With the S3 library you can list out the contents, I think my approach would be to make your API a wrapper for that and try and dispense with the MySQL table abstraction. As for the upload logic, my initial thought would be to just leverage the S3 upload functionality and let it handle the conflicts as it would. It would give you less control, but it would be less code and its behavior would be more predictable and likely more stable as you’re stripping out a lot of logic.

www.reddit.com/r/laravel…