Commit b8577b27 authored by jan.koester's avatar jan.koester
Browse files

tes

parent fc388ee0
Loading
Loading
Loading
Loading
+3 −0
Changes for plugins/media/media.cpp: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -592,10 +592,13 @@ namespace blogi {
                    libhttppp::HttpForm qform;
                    qform.parse(req);
                    for(const auto &qp : qform.urlData()){
                        std::cerr << "media: query param key='" << qp.key << "' value='" << qp.value << "'" << std::endl;
                        if(qp.key == "w"){ try { reqWidth = std::stoi(qp.value); } catch(...) {} }
                        else if(qp.key == "h"){ try { reqHeight = std::stoi(qp.value); } catch(...) {} }
                    }
                }
                std::cerr << "media: mediaId=" << mediaId << " fmt=" << fmt
                          << " reqWidth=" << reqWidth << " reqHeight=" << reqHeight << std::endl;

                // Validate against allowed preview sizes
                if(reqWidth > 0 && reqHeight > 0 && !_isSizeAllowed(reqWidth, reqHeight)){