shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Lindner (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SHINDIG-1161) Multi MediaItems request failed.
Date Wed, 02 Sep 2009 09:00:32 GMT

     [ https://issues.apache.org/jira/browse/SHINDIG-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul Lindner resolved SHINDIG-1161.
-----------------------------------

    Resolution: Fixed

patch committed, thanks!


> Multi MediaItems request failed.
> --------------------------------
>
>                 Key: SHINDIG-1161
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1161
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 1.0, 1.1-BETA1
>         Environment: All browsers and both PHP and Java implementations.
>            Reporter: Yoichiro Tanaka
>             Fix For: 1.1-BETA3
>
>         Attachments: mediaitem.patch
>
>
> Activity object can have some MediaItem objects as opensocial.Activity.Field.MEDIA_ITEMS.
You can create the MediaItem object using opensocial.newMediaItem() function.
> This function has three arguments:
>   mime_type, url, opt_params
> The opt_params is Map.<opensocial.MediaItem.Field, Object>. Then, we write the
following code for posting activity which has two MediaItem objects:
> var mp = {};
> mp[opensocial.MediaItem.Field.TYPE] = opensocial.MediaItem.Type.IMAGE;
> var mi1 = opensocial.newMediaItem("image/gif", "http://example.com/image1.gif", mp);
> var mi2 = opensocial.newMediaItem("image/gif", "http://example.com/image2.gif", mp);
> var data = {};
> data[opensocial.Activity.Field.TITLE] = title;
> data[opensocial.Activity.Field.BODY] = body;
> data[opensocial.Activity.Field.MEDIA_ITEMS] = [mi1, mi2];
> var activity = opensocial.newActivity(data);
> opensocial.requestCreateActivity(activity, ...);
> The result of this code is fail. Posted two images are both "image2.gif". I think that
a constructor of MediaItem class has mistake. Because the opt_params argument is used as MediaItem.fields_
object. It is correct to be copied properties of opt_params to fields_ object, I guess.
> I attach a patch to fix this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message