swiss1939 wrote:
How is this going to affect photos uploaded, but not attached directly to posts?
The PM changes won't directly affect that. However...
swiss1939 wrote:
My hack for that which i stumbled upon was to attach the image and upload it. When create post page reloads, i right click the image attachment link and copy image link, then embed that image link into the post body where needed using img bbcode tag. Then i delete the same image attachment from the post so that it doesn't show up duplicated at the end of the post. This way the image gets uploaded to mv, remains accessible forever, and gets the desired ui placement. But I'm guessing those images now show up in the crm admin as not attached to any post content and are probably orphan attachments.
You're right, that's a hack. As it turns out, that's a long-standing issue with the attachment code. When you upload something to a topic but then don't actually post it, the attachment gets stored on the server anyway (in AWS S3, actually) and then the forum completely loses track of it, effectively making the upload an orphan. It's not in the database at all at that point. It's just taking up space on S3.
I've recently built a script to compare the actual files on the server for each user to what is recorded in the database, in an attempt to gauge this particular problem. It's in the gigabytes. Maybe tens of gigabytes. Large enough that I'm concerned about it.
My intent is to delete all of those orphaned attachments, most of which I imagine were uploaded inadvertently (posts that were not actually posted, etc). I would be surprised if a
lot of people were exploiting the hack you've described, though one user in particular (not you) has so many orphaned attachments, I have to wonder.
Ideally, the forum would support inline photo attachments. There are some obstacles to that (which I am slowly working through) and so it's unlikely that we will have that functionality
soon. In the meantime, I would suggest that a better approach is to attach the photos to a post and then
also inline those photos with image tags. That way, the attachment doesn't get orphaned, we know which attachment goes with which post, and the only down side is that the photo appears twice -- once where you inline it, and once at the end of the post.
For short posts, I would suggest that all of this is completely unnecessary -- a photo slightly below the text is not much of a burden on readers. For longer posts, such as a build thread, I can see where you would want to support inline photos. But even then, we don't support resizing an image or text wrapping or anything like that, so "inline" will still mean edge to edge photo in most circumstances.
I would strongly suggest you go back and re-upload those photos properly on past posts, because the orphaned ones are going to be deleted for sure.