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
{{ message }}
Repository navigation
Error: Call to undefined function cl_image_upload_tag() in element #7
I just tried running your code under cakephp 2.4.1 and php 5.4 and it works fine (with the exception that the App::import calls should not have .php in them). What versions of php and cakephp are you using?
How are you loading these in? I haven't modified anything. I can call cl_image_tag elsewhere, but not cl_image_upload_tag. I don't have cacert.pem loading into my project via require or import. To my knowledge that wasn't listed in the docs.
to fix the issue. Now I'm realizing that the cl_image_upload_tag doesn't allow you to pass along an id or class. So much for customizing the look of the input. :(
EDIT: Man, I must be really sleepy, I just realized that all I need to do is just use existing classes that are assigned.
Activity
TalLevAmi commentedon Sep 16, 2013
I just tried running your code under cakephp 2.4.1 and php 5.4 and it works fine (with the exception that the App::import calls should not have .php in them). What versions of php and cakephp are you using?
robksawyer commentedon Sep 16, 2013
I'm using 5.4.19 and 2.4.1. Note: I'm using the method inside of a CakePHP element. Also, I installed the Cloudinary files via Composer.
using
"cloudinary/cloudinary_php": "dev-master",TalLevAmi commentedon Sep 16, 2013
Works for me inside an element as well.
Do you have the following files in your project?
Did you modify them in any way?
Can you try to call this method from elsewhere (controller, regular view, etc.)?
robksawyer commentedon Sep 16, 2013
How are you loading these in? I haven't modified anything. I can call
cl_image_tagelsewhere, but notcl_image_upload_tag. I don't havecacert.pemloading into my project via require or import. To my knowledge that wasn't listed in the docs.My folder structure looks like:

TalLevAmi commentedon Sep 16, 2013
Try to copy only the contents of the src directory to app/Vendor/cloudinary
Load them using:
robksawyer commentedon Sep 16, 2013
I ended up using the following and it has gotten me passed the
cl_image_tag_uploaderror. Now I'm getting the following.Code reference in view element is below.
TalLevAmi commentedon Sep 16, 2013
Looks like $_POST['fileName'] is null which causes an error when trying to construct the PreloadedFile from it.
robksawyer commentedon Sep 16, 2013
Yep, just realized that.
Added
to fix the issue. Now I'm realizing that the cl_image_upload_tag doesn't allow you to pass along an id or class. So much for customizing the look of the input. :(
EDIT: Man, I must be really sleepy, I just realized that all I need to do is just use existing classes that are assigned.
robksawyer commentedon Sep 16, 2013
BTW: Thanks for all of the help. It seems to be working now!
TalLevAmi commentedon Sep 16, 2013
You can use:
robksawyer commentedon Sep 16, 2013
Beautiful, thanks again.
TalLevAmi commentedon Sep 16, 2013
Happy to help :)