Skip to content

support of base64 string in S3Adapter #600

Closed
@mchun

Description

@mchun

In the current file adapter of api.parse.com, I can see that both file and base64 string are supported.

e.g. data = {"_ContentType":"image/jpeg","base64":"/9j/4AAQSkZJRgABAQAAAQ..........."}
and also
data = $("#ulPhoto1")[0].files[0];

I do rely on this a lot when performing client-side resize image function.
Can we do the same in the S3Adapter?

P.S. This is the code I used to upload image.

$.ajax({
      type: "POST",
      beforeSend: function(request) {
        request.setRequestHeader("X-Parse-Application-Id", 'myAppId');
        request.setRequestHeader("X-Parse-REST-API-Key", 'myRestAPIKey');
        request.setRequestHeader("Content-Type", "image/jpeg");
      },
      url: "http://localhost:1337/parse/files/photo.jpg",
      data: data,
      processData: false,
      contentType: false,
      success: function(photo) {
           ......
      },
      error: function(jqXHR, textStatus, errorThrown)  {
           ......
      }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions