Skip to content

Unable to generate URL without transformation #25

@imagekitio

Description

@imagekitio

I'm initializing Imagekit with above keys as endpoints.

When I'm executing getUrl(Map<String, Object>) with options:

path
signed
expireSeconds
I'm getting Nullpointer due to missing transformation (which is optional accordingly to the documentation). (first issue)

To fix that I added empty list for transformation option.

After that fix SDK returns Signed URL that is not working. I'm getting Unauthorised Image Access (signed parameters are available in the URL).

The code below gives a URL that gives unauthorized image access error:

imageKit = ImageKit.getInstance();
Configuration config = new Configuration(
"public_***",
"private_***",
"https://******/");
imageKit.setConfig(config);Map<String, Object> options = new HashMap<>();
options.put("path", "/productmedias/1500010000/test_x2l9uJMgB.jpg");
options.put("signed", true);
options.put("expireSeconds", 10000);
options.put("transformation", new ArrayList<>());
return imageKit.getUrl(options);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions