Card Images

Apr 14, 2008 at 12:50 PM
I've been trying to change the image that's generated on a card, I haven't had any success yet.

I've been tracing the code, and it seems that when I supply an ImageFileName in my GetRequestBody, the server doesn't correctly construct the file path.

For example, I set:
getRequestBody.ImageFileName = "logo.gif";

and on the server, in web.config, I have:
cardImageDirectory="C:\DotNetNuke\Portals\0\"

In this scenario I get a path generated as: "C:\DotNetNuke\Portals\0\;logo.gif" - the semicolon is invalidating the path.

It looks like an easy fix, I'm just wondering if I'm doing something wrong.

Also, I would prefer to send the card image in the GetRequestBody (as DotNetNuke's multi-portal system allows each site to have more than one logo)
So two options could work here - either I send the binary of the image, or I send a fully qualified path to the image.

Thanks,
Daniel Bartholomew
Coordinator
Apr 14, 2008 at 2:44 PM
Edited Apr 14, 2008 at 2:46 PM

DanielBartholomew wrote:
I've been trying to change the image that's generated on a card, I haven't had any success yet.

I've been tracing the code, and it seems that when I supply an ImageFileName in my GetRequestBody, the server doesn't correctly construct the file path.

For example, I set:
getRequestBody.ImageFileName = "logo.gif";

and on the server, in web.config, I have:
cardImageDirectory="C:\DotNetNuke\Portals\0\"

In this scenario I get a path generated as: "C:\DotNetNuke\Portals\0\;logo.gif" - the semicolon is invalidating the path.

It looks like an easy fix, I'm just wondering if I'm doing something wrong.

Also, I would prefer to send the card image in the GetRequestBody (as DotNetNuke's multi-portal system allows each site to have more than one logo)
So two options could work here - either I send the binary of the image, or I send a fully qualified path to the image.



You're probably not doing anything wrong; that whole bit is very up in the air right now; so I probably messed up! Will take a look at it this morning.

I see the point about being able to send a binary image over; however I avoided that on purpose; as maybe, some day, it may be php or java calling the card control service and once we start pushing binary blobs around all pretence at interoperability goes out the window.
Coordinator
Apr 14, 2008 at 3:52 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 14, 2008 at 3:57 PM
My bad. I used Path.PathSeperatorChar instead of Path.DirectorySeparatorChar.

Fixed in changeset 10174
Apr 14, 2008 at 10:11 PM
Thanks, I'll pull down the changeset this evening.

I understand the interoperability issues surrounding sending the image binary - I would still like the ability to send a fully qualified file name for an image. What are your thoughts on this?
Coordinator
Apr 15, 2008 at 4:53 AM

DanielBartholomew wrote:
Thanks, I'll pull down the changeset this evening.

I understand the interoperability issues surrounding sending the image binary - I would still like the ability to send a fully qualified file name for an image. What are your thoughts on this?



OK whilst I would hope that the context your web application is running in is limited and we do a cas demand the idea of supporting full access to the file system is scary; too much could go wrong for me to feel comfortable with.