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

Reply via email to