aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/piwigo/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/plugins/piwigo/views.py')
-rw-r--r--mediagoblin/plugins/piwigo/views.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/mediagoblin/plugins/piwigo/views.py b/mediagoblin/plugins/piwigo/views.py
index e064b418..837d8eca 100644
--- a/mediagoblin/plugins/piwigo/views.py
+++ b/mediagoblin/plugins/piwigo/views.py
@@ -23,8 +23,8 @@ from werkzeug.wrappers import BaseResponse
from mediagoblin import mg_globals
from mediagoblin.meddleware.csrf import csrf_exempt
from mediagoblin.submit.lib import check_file_field
-from .tools import CmdTable, PwgNamedArray, response_xml
-from .forms import AddSimpleForm
+from .tools import CmdTable, PwgNamedArray, response_xml, check_form
+from .forms import AddSimpleForm, AddForm
_log = logging.getLogger(__name__)
@@ -133,6 +133,15 @@ def pwg_images_addChunk(request):
return True
+@CmdTable("pwg.images.add", True)
+def pwg_images_add(request):
+ _log.info("add: %r", request.form)
+ form = AddForm(request.form)
+ check_form(form)
+
+ return {'image_id': 123456, 'url': ''}
+
+
@csrf_exempt
def ws_php(request):
if request.method not in ("GET", "POST"):