← Back

ofxUploader

github.com/darrenmothersele/ofxUploader · @darrenmothersele
OF 0.8 Web/Networking

An addon for openFrameworks to upload data to a webserver.

3 0 Last commit 13y ago Created 13y ago

README

ofxUploader



An openFrameworks addon for posting data to a webpage. Data can be added from strings or by taking a snapshot of the screen and attaching as a base64 encoded image.

Usage



Include the addon in your project, then initialise an instance of the uploader in your app class:

#include "ofxUploader.h"

class testApp : public ofBaseApp{

ofxUploader uploader;

public: testApp() : uploader("example.com", 80, "/upload.php") {} };

Then simply add items to the uploader (optionally a screenshot) and call the send() method to post the form data to the address you previously specified in the constructor. For example:

void testApp::keyPressed(int key){ if (key == 'a') { stringstream ss; ss << "a random number is " << ofRandom(255) << endl; uploader.addItem("random", ss.str()); uploader.addSnapshot(); uploader.send(); } }

Get this addon

HTTPS
SSH