Laravel Backpack saves files twice with wrong directory path #1096
Unanswered
IlyaBuldakov
asked this question in
Q&A (Help)
Replies: 3 comments 2 replies
-
Hey @IlyaBuldakov Can you share your model & CRUD controller code? It would help to find & resolve your issue. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have edited my question so that desperate seekers can find it in case of one of these problems. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have the same issue. I think this should be considered as a bug. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Laravel Backpack.
I have a Product model. It has photos (wow) that I upload when creating a model in the backpack admin panel.
But there is a problem! Photos are uploaded twice:
Also my database entry:
The project is built according to EAV principles and my model has a common setAttribute() method in combination with guarded = [], which allows you to flexibly customize product attributes (they are all different). I mean, the 'img_path' field is also set using this method. I used dd() to see how many times Backpack enters this method. The result is as follows:
Also my model's field
images_directory
wich specifies the path with product's images rewrites by second firingProductCrudController::setupCreateOperation()
. Where should I store this field?Thank you all in advance!
I tried to create my own Uploader, tried to make restrictions in the model. The expected result is that the image is saved once
Beta Was this translation helpful? Give feedback.
All reactions