nSo the complete flow becomes:
Admin selects image → preview appears → Publish Article → PHP creates uploads/blog/ if necessary → image is uploaded → unique filename is generated → path is saved in blog_posts.image.
One important security detail: the PHP code checks the actual MIME type, rather than trusting only the filename extension.
nSo the complete flow becomes:
Admin selects image → preview appears → Publish Article → PHP creates uploads/blog/ if necessary → image is uploaded → unique filename is generated → path is saved in blog_posts.image.
One important security detail: the PHP code checks the actual MIME type, rather than trusting only the filename extension.