I’d like to host a couple of .ics files on my mb site. I might need to re-upload them a couple of times. When I tried this last year, they uploaded with a .jpg (i think?) suffix which I then manually renamed after deleting the previous version. I’d really like to eliminate the manual steps if possible - any suggestions?
I’ve recently come across a similar use case where I have a page that hosts an image. The image will change over time, but the page doesn’t need to, so it would be great to put a fixed name image there that can be overwritten as needed. It seems like the only way to do that right now would be to host the image elsewhere instead of micro.blog.
Micro.blog has an allow list of file types for uploads. Only @manton can change that to include a .ics file.
Micro.blog’s interface doesn’t support naming uploads. I’m pretty sure the API does though, so you could probably do this with something like Shortcuts, though I don’t know if the API will allow you to upload something with an existing name collision and just overwrite it versus creating a unique name or bouncing the upload.
Thanks! Would love this as a feature on the site, but I will look into utilizing the API for this.
The API will use the filename if it’s a recognized filetype. If it conflicts it’ll return a random name. I don’t see an API to delete an upload either, so always have to drop out to manually fixing names.
Ah I see. I think I misunderstood the previous comment. Thanks!
I’ll add .ics to the supported extensions this week.
We do support upload renaming now. On the web, click the upload, then click the Rename button. There’s no API for this but there really should be… It’s not something that the Micropub spec covers so would need to be an extension to that, or something just for Micro.blog.
The .ics change has been rolled out.
Thanks!
Even if we could just “overwrite existing file” via API that would be awesome.
I think we could add a “replace” action for media uploads. We wouldn’t want to do that by default because it’s pretty common to have all uploads called something like “photo.jpg”.
I’ll work on this. It would essentially delete the old file, add the new file, and make sure that the URL path is preserved.
That is exactly what I need, thanks! Absolutely not the default but as an option or parameter action that would be perfect!