Issue with Paths

Jan 8, 2008 at 3:50 PM
I notice there's an issue in the Issue Tracker that's been resolved.

http://www.codeplex.com/LiveNet/WorkItem/View.aspx?WorkItemId=793

Has this code been released yet as this is an issue I'm currently encountering. I created an album and uploaded some images via the Spaces site for quickness to test my pages for reading in the images, but as per this issue, it can't find them.

Thanks (again!).
Coordinator
Jan 8, 2008 at 4:25 PM
It hasn't as yet. The initial plan was to wait until the next release (0.3) was released. But I might make a small incremental release for this bug fix. If you do need it now, you can always download the source code and compile it and that will include the fix as it's in the code, just not in a released dll.

SL
Jan 8, 2008 at 6:18 PM


ScottIsAFool wrote:
It hasn't as yet. The initial plan was to wait until the next release (0.3) was released. But I might make a small incremental release for this bug fix. If you do need it now, you can always download the source code and compile it and that will include the fix as it's in the code, just not in a released dll.

SL


OK, I'll download the latest source code release and compile it myself for now. Thanks.

Starting to feel a bit guilty being the only one posting in here!
Coordinator
Jan 8, 2008 at 9:48 PM
i wouldn't feel guilty - but i just IM scott directly :)
Coordinator
Jan 9, 2008 at 9:36 AM
LiveNet 0.2.0.1 (Alpha) has been released.
Jan 9, 2008 at 9:39 AM
I downloaded the source code and compiled it but was still having the same problem. Just as I was about to post I noticed you have released a 0.2.1 release so I've downloaded that but still, the images are not being shown. It's picking up their captions fine, and showing the correct number of images but the images themselves are not being displayed.

The URL being retrieved is https://cumulus.services.live.com/<WLID>/SpacesPhotos/<ID>/<IMAGENAME>
Coordinator
Jan 9, 2008 at 10:44 AM
How are you trying to display the image? Are you making the img src to be the cumulus link? If so, this won't work. Will go into more detail once I know how you're trying to display the image :)

SL
Jan 9, 2008 at 11:21 AM


ScottIsAFool wrote:
How are you trying to display the image? Are you making the img src to be the cumulus link? If so, this won't work. Will go into more detail once I know how you're trying to display the image :)

SL


Hi Scott,

I'm creating a DataTable, which holds the ImageName, ImageCaption, ImageURL and LastModified values. I'm then binding this to a DataList control using declarative markup. e.g.

<asp:DataList ID="photoThumbnails" runat="server" RepeatColumns="6" RepeatDirection="Horizontal" RepeatLayout="Flow">
<ItemTemplate>
<a href="<%# Eval("ImageURL") %>"><asp:Image ID="photo" ImageUrl='<%# Eval("ImageURL") %>' AlternateText='<%# Eval("ImageCaption") %>' runat="server" /></a>
</ItemTemplate>
</asp:DataList>
Coordinator
Jan 9, 2008 at 11:38 AM
Ok, if you check http://www.codeplex.com/LiveNet/SourceControl/FileView.aspx?itemId=49177&changeSetId=5760, and look at the btnGetPhoto_Click method, you'll see where we assign the image url is:

imgPhoto.ImageUrl = string.Format("./photo.lnet?url={0}&oh={1}", photo.PhotoPath, photo.Owner.UserId);

We have included in the API a handler page for displaying the images. In your web.config, you will need to make sure you have this section:

<httpHandlers>
<add verb="*" path="photo.lnet" type="LiveNet.Web.LivePhotoHandler, LiveNet" />
</httpHandlers>

What you will probably need to do is create a Photo object from the ImageURL that you have stored, then you can assign the asp:Image's ImageUrl to be the same format as what I showed above.

You will also need to implement a class that inherits from LiveNet.Authentication.IHttpAuthenticationObtainer.

Best thing I can suggest really is to just look through the LiveNetSampleSite in the source code and you will see where everything falls into place.

SL
Jan 9, 2008 at 3:26 PM
Great, got it working now, thanks.
Coordinator
Jan 9, 2008 at 3:31 PM

mparter wrote:
Great, got it working now, thanks.


Cool :D
Jan 9, 2008 at 4:20 PM


ScottIsAFool wrote:

mparter wrote:
Great, got it working now, thanks.


Cool :D



Sorry to be a pest, but do you know of any ASP.NET ImageHandler code that could take an image from the URL (e.g. string.Format("./photo.lnet?url={0}&oh={1}", photo.PhotoPath, photo.Owner.UserId);) and resize this for output to the page? The one's I've find to date deal primarily with file-based images and I have enough to do just now without re-writing one of those.
Coordinator
Jan 10, 2008 at 8:47 AM
Unfortunately, I don't. Sorry.
Developer
Jan 10, 2008 at 11:30 AM


mparter wrote:


ScottIsAFool wrote:

mparter wrote:
Great, got it working now, thanks.


Cool :D



Sorry to be a pest, but do you know of any ASP.NET ImageHandler code that could take an image from the URL (e.g. string.Format("./photo.lnet?url={0}&oh={1}", photo.PhotoPath, photo.Owner.UserId);) and resize this for output to the page? The one's I've find to date deal primarily with file-based images and I have enough to do just now without re-writing one of those.


This could be something that we could intergrate into the imagehandler within LiveNet. Hopefully the Spaces Api will give the ability to request photos as a certain size (thumbnails/medium/original etc..) at some point in the future.
Coordinator
Jan 10, 2008 at 1:51 PM
Indeed, as Angus mentioned in Is Windows Live Space Photos the right tool for me?:


number of requests for thumbnailed images (coming in January)


SL