1D
As A developer I want Documentation on how to upload, create, save and update Media to The Media Library So it's done it as intended · Issue #647 · corcel/corcel · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably isn't documented because it's outside of the scope of what Corcel does currently, which is read and write to Wordpress Databases using Eloquent.
Attachments are just posts with Post Type = "Attachment", as well as a mime type. The file path is attached via post_meta.
Usually Wordpress does your file upload through normal PHP file upload actions, does some resizing if it's possible then puts it in wp-content/uploads/YYYY/MM/filename.extension
Corcel can only write to the database given it's current configuration. In order to upload media, you'd either need to have the wordpress theme directory as a storage disk in Laravel, or to use the Wordpress API.
Having storage connected to the wp-content folder doesn't "feel" right to me
TLDR
Corcel can't without disk access somehow
Use the API rather than Storage:: facade
Submit a Pull request that creates a new file called Attachment.php in corcel/src/Model/ that extends Post that overrides the create method on Attachcments and does it via the API
4)???
First of thanks for a great package! ❤️
Description:
There should be documentation on how to
Media to The Media Library
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: