Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into rxjs-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dilame committed Apr 2, 2019
2 parents 1b69078 + 28a1ff3 commit 599badb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/v1/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,20 @@ export class Media extends Resource {
});
}

static configurePhoto (session, uploadId, caption, width, height, userTags) {
static configurePhoto (session, uploadId, caption, width, height, userTags, location) {
if (_.isEmpty(uploadId)) throw new Error('Upload argument must be upload valid upload id');
if (!caption) caption = '';
if (!width) width = 800;
if (!height) height = 800;
if (!userTags) userTags = {};

const CROP = 1;
let geotag_enabled = true
if (!location){
location = {};
geotag_enabled = false
}


return session
.getAccountId()
.then(accountId => {
Expand All @@ -106,6 +112,8 @@ export class Media extends Resource {
usertags: JSON.stringify(userTags),
_uid: accountId.toString(),
device: session.device.payload,
geotag_enabled: geotag_enabled,
location: JSON.stringify(location),
edits: {
crop_original_size: ['$width', '$height'],
crop_center: ['$zero', '$negativeZero'],
Expand Down

0 comments on commit 599badb

Please sign in to comment.