Cannot upload under specific folder #1248
Replies: 2 comments 2 replies
-
Based on the information provided in your question and the knowledge sources available, it appears that you're using Backpack CRUD with Spatie Media Library to handle file uploads. However, the specific issue you're encountering is not directly addressed in the provided knowledge sources. That being said, I can offer some insights based on the available information:
To troubleshoot this issue, you could try the following:
CRUD::field('gallery')
->label(__('backend/installations.gallery'))
->type('repeatable')
->subfields([
[
'name' => 'main_image',
'label' => __('backend/installations.image'),
'type' => 'image',
'withFiles' => [
'disk' => 'uploads',
'path' => 'installation_images',
]
],
]);
If these suggestions don't resolve the issue, it's possible that there's an interaction between Backpack and Spatie Media Library that's not covered in the available knowledge sources. In that case, you might need to consult the specific documentation for integrating Spatie Media Library with Backpack, or reach out to the Backpack community for more targeted assistance. ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️ Relevant sources: Github Issue (open): [Bug] Upload subfield contains wrong url in repeteable relationship field |
Beta Was this translation helpful? Give feedback.
-
Documentation need to be updated ... it's withFiles not withMedia |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to upload the images under "public/uploads" folder, so I've created the following field:
then, within the model I have configured these two methods:
I'm using Spatie Media Library, so the model class implement HasMedia.
The
filesystems.php
contains the following code:the problem's that all the images are uploaded under the storage path, like: "/storage/17/pjZTcwJrnxdk1uGobMLtOM8cXL78gNDaZ8QY4YAw.jpeg"
How is that possible?
Beta Was this translation helpful? Give feedback.
All reactions