0

I want to upload (copy) a file from a known url to Cloudinary from client-side javascript code without using any file upload UI. How can it be done?

I read the docs but just couldn't understand how this can be done.

1 Answer 1

2

You can use the following syntax:

$('.cloudinary_fileupload').cloudinary_upload_url(url);

This will initiate an upload request to Cloudinary with the url as instead of a local file.

Sign up to request clarification or add additional context in comments.

4 Comments

So I have to pass all the other arguments in the <input> field? It seems a little awkward
The common use-case is widgets where a user can either upload a local image or give a remote url. Thus the configuration is done once on the input tag for both cases.
Calling $('.cloudinary_fileupload').cloudinary_upload_url(url); produces following error response - {"error":{"message":"Missing required parameter - file"}}. Any thoughts as to what I might be doing wrong? I think I should mention is that I overrode fileupload add method to manually trigger upload by calling data.submit().
Once again, thanks for your help Tal. For those who are having same issue, brief problem description and solution can be found here: http://support.cloudinary.com/entries/26830108-Cloudinary-jQuery-plugin-upload-from-URL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.