automatic upload from external url without base url?
I'm trying to integrate a (public) image editor on my site and upload the result to cloudinary. For now I'm gonna use Aviary's web editor for that.
I'd like to know if I can use the fetch method for that. Aviary's resulting image is available for a short time only, meaning that I'd have to use fetch with automatic image uploading.
However, I read their output isn't saved in any specific base path, and I should not rely on that, meaning that I cannot use auto upload mapping, or can I use it without mapping, eg. specify a folder for non-matching/wildcard sources.
Otherwise I guess I'm gonna have to use the jquery plugin.
-
Been doing some reading and looks like I need to use the upload method, and requires mapping. Is it possible to ignore certain parts of urls, eg. using wildcards?
Aviary's save path looks like this:
http://s3.amazonaws.com/some-slug-that-might-change/user-key/date/random-file-nameWould be great if I could map eg. http://s3.amazonaws.com/*/user-key/ to a folder
0 -
I asked about the wildcard mapping, so I can set it up to only accept uploads from "user-key". Actually, maybe an idea to use wildcard characters to remove folders/slugs from the source url, resulting in shorter urls and less nested folders (or shorter ID) for those who want it.
Example mapping:
folder: myfolder
url prefix: http://example.com///*/url: http://example.com/child/grandchild/greatgrandchild/image.jpg
result: http://res.cloudinary.com/demo/myfolder/image.jpgThis could be extended to using it for shortening/renaming folders, eg. if a wildcard does not result in an empty "slug" (and thus remove it) it could replace it with whatever is defined, eg:
url prefix: http://example.com/a//*c/
result: http://res.cloudinary.com/demo/myfolder/a/c/image.jpgThis would give even more fine-grained control without having to use plugins and server side code.
0 -
Hi Danny,
Currently we don't support mapping likehttp://s3.amazonaws.com/*/user-key/
, however you can either use standard API upload from the remote URL, or you can use fetch, which isn't limited to a specific mapping0
Post is closed for comments.
Comments
3 comments