-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help] Image does not get written to file system #51
Comments
Any ideas? I really need this working within the next few days, otherwise I would have to try to write my own thing, which I would like to avoid! |
Hi. How about Picture::boot() ? 'Stapler' trait has boot() method (only calling static::bootStapler() method.) and registers some model events in it. |
What @x46k said is true; if you've overridden the static boot method of your model then you're going to have to make a call to static::bootStapler() somewhere within that method. Take a look at this: #61 |
Hmmm, I'm using Ardent. Might that be the issue? |
I am having the same problem. Ardent is overwriting the boot method and then Confide is extending Ardent and then User class is extending that. However, if after updating the boot method I am still having problems. Every figure this out? Here is my code added to the User model:
|
I think the issue is that the Stapler EloquentTrait shouldn't have a boot() method in it at all. I was having the same issue on models that I was adding in global scopes in the boot() method, but since I was also using the EloquentTrait that method wasn't ever getting called since the model was directly overriding it. If you remove the boot() function from Codesleeve\Stapler\ORM\EloquentTrait and replace it with this everything works fine:
I'm going to open a pull request with this change, I'm guessing others have run into the issue. |
This has been implemented in the upcoming 2.0 release (currently on the dev branch). |
Well, here we go again: I have yet another file system issue.
I am using Stapler in two cases: For the Avatar changing and for the user galleries. When I upload an avatar and save my profile the file gets uploaded and processed like it should. I am using the below code for this:
For the galleries it's somehow not working. I don't quite know why, but it somehow stopped working - for absolutely no reasons, I did not change anything on the webserver nor the upload code. I am using the following code for the picture uploads:
When the avatar saves it also creates all the needed subfolders. When the picture gets uploaded it doesn't create the folders. I already checked, and yes indeed, I do have the right permissions set:
drwxrwxrwx 1 vagrant vagrant
.Why has this code somehow stopped working? I haven't updates stapler either ... It's a mystery to me.
The text was updated successfully, but these errors were encountered: