Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 07 2021 13:24
    dereuromark commented #46
  • Nov 09 2020 14:36
    jeffersonsimaogoncalves synchronize #46
  • Nov 09 2020 14:23
    jeffersonsimaogoncalves synchronize #46
  • Nov 09 2020 03:22
    jeffersonsimaogoncalves opened #46
  • Jul 05 2020 17:18
    Casmo commented #40
  • Jun 22 2020 14:04

    bobmulder on master

    Use 'fields' from CreatedBy or … (compare)

  • Jun 22 2020 14:04
    bobmulder closed #44
  • Jun 22 2020 12:59

    martonmiklos on master

    Fix null pointer exception in W… (compare)

  • Jun 22 2020 12:59
    martonmiklos closed #45
  • Jun 22 2020 09:18
    coveralls commented #44
  • Jun 22 2020 09:16
    bancer synchronize #44
  • Jun 22 2020 09:13
    coveralls commented #45
  • Jun 22 2020 09:11
    bancer opened #45
  • Jan 28 2020 15:32
    bobmulder commented #44
  • Jan 28 2020 10:14
    coveralls commented #44
  • Jan 28 2020 10:12
    bancer opened #44
  • Sep 19 2019 14:33
    martonmiklos closed #38
  • Sep 19 2019 14:33
    martonmiklos commented #38
  • Sep 19 2019 14:25
    martonmiklos closed #42
  • Sep 19 2019 14:25
    martonmiklos commented #42
Bob Mulder
@bobmulder
Hmm very strange... What's the most recent commit?
Paul Vaughan
@vaughany
commit d9739ec7ba734403ff581d31bd8452881d01b860
Author: BobMulder bobmulder@outlook.com
Date: Sat Jun 13 00:43:49 2015 +0200
Support for 1.0-branch has been stopped
I seem to be on the older branch! Not sure how...
Bob Mulder
@bobmulder
Yeah you should move to branch master
Just run composer require cakemanager/cakephp-utils:dev-master
It will reload automatically
Paul Vaughan
@vaughany
Ahh, okay, it says cakemanager/cakephp-utils:1.0.x-dev on the GitHub readme .:)
Bob Mulder
@bobmulder
I will fix it ;) sorry!
Paul Vaughan
@vaughany
No worries, thanks for the realtime help. :)
Bob Mulder
@bobmulder
No problem :)
Committed the right branch for the README.md :) Thanks @vaughany. Enjoy the plugins ;)
Paul Vaughan
@vaughany
Hi again. I've been trying to get Uploadable behaviour working and I just can't seem to. Could you possibly help? I've added my database configuration and code changes to a Gist here: https://gist.github.com/vaughany/ec10bc8219b9e47793de
The plugin is loaded correctly, no errors are being reported anywhere. But nothing is being added to the designated field in the database and I don't know why.
Bob Mulder
@bobmulder
Hey @vaughany, be sure you are using the dev-master branch.
Also the 'avatar' column should be set on true in your Entity
Paul Vaughan
@vaughany
Yep, I definitely am this time. :)
Bob Mulder
@bobmulder
Haha okay. What error do you get?
Paul Vaughan
@vaughany
Ah, I didn't know about editing the Entity/user.php file. I've just done that and now I'm getting permissions errors (which is new).
Let me fix these and I'll report back.
Bob Mulder
@bobmulder
Ok. Good luck
Paul Vaughan
@vaughany
Well done, you fixed it!
Bob Mulder
@bobmulder
Cool. What was wrong? ;)
Paul Vaughan
@vaughany
Simply that the Entity/user.php wasn't edited, and I changed the path config setting from default to some pre-made writeable folders instead.
Bob Mulder
@bobmulder
Ah okay. Maybe we should make the docs more clear?
Paul Vaughan
@vaughany
Yes, it did stump me for quite a bit and I'm definitely a relative newcomer to CakePHP.
Bob Mulder
@bobmulder
No problem. It's good to learn, I do every day :P
Paul Vaughan
@vaughany
Cool, thank you. Will look forward to the 'remove file on update/delete' features being available. :)
Bob Mulder
@bobmulder
Hm good point... Should implement that soon :$ Hopefully got time friday, or someone else should do it ;)
Paul Vaughan
@vaughany
I would say I'd offer but I am too new at this (and likewise have little time!).
Bob Mulder
@bobmulder
Ok... Just give it some time. Will keep you up to date.
danielz
@danielzzz
hi there
I have a similar problem
no error whatsoever, but the file doesn't seem to be uploaded (and the db is not updated)
I narrowed it down to a problem in UploadableBehavior.php, function _ifUploaded
this line returns empty: $entity->get($field);
I am not sure why..
the field is set to true in the entity file
and the file I'm trying to upload appears to get uploaded correctly
any ideas?
danielz
@danielzzz
it seems like after patchEntity the files are set to null
I mean the fields
but I have them set as accesible
and in $this->request->data, the field appears as: [
'name' => 'image.png',
'type' => 'image/png',
'tmp_name' => '/tmp/phpcazUER',
'error' => (int) 0,
'size' => (int) 418433
]
Bob Mulder
@bobmulder
Hi @danielzzz, Thank you for your feedback. Did you fix it already, or is there something to do yet?
Bob Mulder
@bobmulder
I have installed the uploadable plugin in a new project and tried it. It works perfectly for me... ;)
However, I've done a new commit to remove the debug calls.
Tomas Gonzalez
@Tomicapo
Hi. I've implemented uploadable behavior successfuly but I found a problem with the directory separator.
I'm on Windows and the URL for the image appears with back slash "\" and of course, chrome isn't able to find the image.
Paul Vaughan
@vaughany
I think I have seen a constant 'DS' (in CakePHP generally, not in this plugin specifically), which IIRC refers to an operating system-appropriate directory separator. This could be used?
Tomas Gonzalez
@Tomicapo
Yes, the problem is that when saving the path, it's saved with the DS instead of a slash "/" which is the correct character for a URL.
So when showing an image that was saved in a windows server, the path appears with a back slash "\" so the image can't be found by the browser.
Paul Vaughan
@vaughany

Isn't the DS constant set differently on different systems? So on my Debian server it's "/" and on Windows it would be "\"?

It sounds like you're saving the path as a string and therefore the / or \ is being saved also, but possibly incorrectly. You need to save the path without the slashes and build the path with the DS constant instead.