Skip to content
This repository was archived by the owner on Jan 5, 2021. It is now read-only.
This repository was archived by the owner on Jan 5, 2021. It is now read-only.

loading image data from URL with parse-image and Parse.Cloud.httpRequest #2

@sraveh

Description

@sraveh

I'm trying to use parse-image with the new parse server.
My code in parse cloud load an image from a URL and uses the parse image module library to manipulate it.

return Parse.Cloud.httpRequest({
url: url
}).then(function (response) {
var image = new Image();
return image.setData(response.buffer);
});

The URL I've been using for testing is: http://lorempixel.com/500/500/cats/.
This all work nicely on Parse.com when trying the same code with the local parse server and parse image I notice few things:

  1. the response does not contain buffer anymore. it is just the raw data.
  2. when passing the data to parse-image using image.setData(response); I get an error from gm

Appreciate any help

Thanks,
Simon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions