Hey,

What's your setup? Built-in httpd? Windows or Linux?

You may need to configure your http server to allow for a certain file size
to be uploaded - it is possible that e.g. apache filters out the upload
even before it reaches Wt. I'll describe he procedure for wthttpd in this
mail, but for wthttpd your 'too large' signal should be triggered. I tested
this with the composer example on the current git version, and that seems
to work.

The limit in the Wt configuration file for the maximum size of a POST is
very tight if you plan to upload files. Probably you need to change this in
wt_config.xml:

<!-- Maximum HTTP request size (Kb)

   Maximum size of an incoming POST request. This value must be
   increased when the user is allowed to upload files.
 -->
<max-request-size>128</max-request-size>

Run your application with --help to see the instructions on where to find
the wt_config.xml, or how to specify which one has to be used:

-c [ --config ] arg

location of wt_config.xml; if
unspecified, the value of the
environment variable $WT_CONFIG_XML is
used, or else the built-in default
(c:/witty/wt_config.xml) is tried, or
else built-in defaults are used


Best regards,
Wim.


2014-10-09 9:02 GMT+02:00 Torsten Schulz <tssch...@gmx.net>:

> Hi,
>
> for me the upload isn't working too. I added a Progressbar, and it is ever
> on 0 %. But this problem is only with Apache, with the wthttp it is working.
>
> Greetings
> Torsten
>
> *Gesendet:* Mittwoch, 08. Oktober 2014 um 22:10 Uhr
> *Von:* "Daniel Horsey" <dan.hor...@broadruntech.com>
> *An:* witty-interest@lists.sourceforge.net
> *Betreff:* [Wt-interest] File upload
>
> Hi:
>
>
>
> I’m trying to implement a file upload for my project.  My code is as
> follows:
>
>
>
> # begin sample
>
>
>
> TUpload::TUpload(Obj *myObj, Wt::WContainerWidget *parent){
>
>        uploader_ = new Wt::WFileUpload(parent);
>
>        uploader_->setFileTextSize(50);
>
>        pb_ = new Wt::WPushButton("Upload File");
>
>        parent->addWidget(pb_);
>
>
>
>        uploader_->changed().connect(std::bind([=] () {
>
>               myUpload();
>
>        }));
>
>
>
>        uploader_->uploaded().connect(std::bind([=] () {
>
>               fileUploaded();
>
>        }));
>
>
>
>        pb_->clicked().connect(std::bind([=] () {
>
>               myUpload();
>
>        }));
>
>
>
>        uploader_->fileTooLarge().connect(std::bind([=] () {
>
>               upLoadProblem();
>
>        }));
>
>
>
> }
>
>
>
> void TUpload::fileUploaded(void) {
>
>        std::cout << "File uploaded to " << uploader_->spoolFileName() <<
> std::endl;
>
> }
>
>
>
> void TUpload::upLoadProblem(void){
>
>        std::cout << "File too large signal " << std::endl;
>
> }
>
>
>
> void TUpload::myUpload(void){
>
>        bool up = uploader_->canUpload();
>
>        uploader_->upload();
>
> }
>
>
>
> #end sample
>
>
>
> When I execute this, I never get the file_too_large, or uploaded signal.
> When I look on the debugger, I see that canUpload returns true.  Looking at
> the output log, I do see a http code 413 (request too large).  I added
> fileTextSize, but that only seems to change the size of the line edit for
> the filename.
>
>
>
> What am I missing here?  Is there some other result I should be listening
> for?
>
>
>
> Thanks,
>
>
>
>             -dan
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI
> DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you
> Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI
> DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk_______________________________________________
> witty-interest mailing list witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to