class Cloudinary::Connect
- Cloudinary::Connect
- Reference
- Object
Overview
Adding module for upload image to cloudinary Has been add:
- api_key => of acount on cloudinary
- cloud_name => of cloud in the acount
- preset => of preset that gives permission, read documentation of module or cloudinary
Defined in:
cloudinary.crConstructors
Instance Method Summary
-
#upload(env, folder : String)
Upload image to server
Constructor Detail
Create a instace
api_key
=> of acount on cloudinary
cloud_name
=> of cloud in the acount
preset => of preset that gives permission, read documentation of module or cloudinary
Instance Method Detail
def upload(env, folder : String)
#
Upload image to server
env
refers to context of server when make a request to endpoint
folder
where the image is saved in the cloudinary
Example:
server = HTTP::Server.new do |context|
response = CLOUDINARY.upload(
context,
"test"
)
context.response << response
end
server.bind_tcp 8085
server.listen