Changeset 28545 for trunk/ws.php


Ignore:
Timestamp:
May 27, 2014, 4:11:23 PM (10 years ago)
Author:
plg
Message:

feature 2616: HTML5 upload (with plupload 2.1.2). First basic implementation. Needs customization.

Chunked upload + Drag & drop (no more Flash)

use a new specific API method pwg.images.upload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ws.php

    r27811 r28545  
    466466
    467467  $service->addMethod(
     468      'pwg.images.upload',
     469      'ws_images_upload',
     470      array(
     471        'name' => array('default' => null),
     472        'category' => array(
     473          'default'=>null,
     474          'flags'=>WS_PARAM_FORCE_ARRAY,
     475          'type'=>WS_TYPE_ID
     476          ),
     477        'level' => array(
     478          'default' => 0,
     479          'maxValue' => max($conf['available_permission_levels']),
     480          'type' => WS_TYPE_INT|WS_TYPE_POSITIVE
     481          ),
     482        'pwg_token' => array(),
     483        ),
     484      'Add an image.
     485<br>Use the <b>$_FILES[image]</b> field for uploading file.
     486<br>Set the form encoding to "form-data".',
     487      $ws_functions_root . 'pwg.images.php',
     488      array('admin_only'=>true, 'post_only'=>true)
     489    );
     490 
     491  $service->addMethod(
    468492      'pwg.images.delete',
    469493      'ws_images_delete',
Note: See TracChangeset for help on using the changeset viewer.