Hello again,
well, I have digged into the WPainter class, and the class is unable to
retrieve the image size: size.x() and size.y() are 0, so the exception in
line 134 is thrown.

Now the value of the fileName  argument is
fileName = "C:\Users\JHLEGA~1\AppData\Local\Temp\wt-5826.tmp"

which is the spoolFileName given by WFileUpload's corresponding method.

Any hints?

Thanks,
JON HAITZ




---------- Forwarded message ----------
From: Jon Haitz Legarreta <jhlegarr...@vicomtech.org>
Date: 10 June 2013 16:15
Subject: Re: [Wt-interest] [Wt] Problems uploading and displaying a local
image file
To: witty-interest@lists.sourceforge.net


Dear Koen,
thanks again for your early answer.

As for the m_SpoolFileName, it's the spoolFileName given by WFileUpload's
corresponding method. Even hard-coding the original filename (including the
path and extension) instead the spool filename the exception I get is just
the same.

According to the call stack (attached, even if I guess it does not help
much at this point), the WebSession, the Application and all the widgets
contained in are being destroyed. Indeed, the destroyer of my widget
container (ImageUploadWidgetContainer) is being called when trying to use
the mentioned option.

This is strange. Any hints?

Thanks again,
JON HAITZ







On 10 June 2013 14:50, Koen Deforche <k...@emweb.be> wrote:

> Hey Jon,
>
> 2013/6/10 Jon Haitz Legarreta <jhlegarr...@vicomtech.org>:
> > Yes, that works. However, while trying to let Wt guess the image size,
> the
> > second argument, according to the doc, should be a const std::string &
> file,
> > the local filesystem as file.
>
> m_SpoolFileName.toUTF8() is precisely that?
>
> > I've tried with WFileUpload's clientFileName, which is the only local
> > resource I can reach according to the API, but I get an error at
> > std::string.
>
> The clientFileName() should be the filename that the file had on the
> client's computer -- it does not relate to anything at the server, and
> it's not very trustworthy either (some browsers provide the full path,
> while others don't).
>
> Regards,
> koen
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to