Browse Source

better handling of POST

master
Pascal Gloor 5 years ago
parent
commit
200a0804bd
1 changed files with 16 additions and 2 deletions
  1. 16
    2
      cgi/autodoc.fcgi

+ 16
- 2
cgi/autodoc.fcgi View File

return db_get_document_object($id); return db_get_document_object($id);
} }


sub api_v1_POST_documents_id_data { return api_error(501,"Not yet implemented"); }
sub api_v1_POST_documents_id_data {
my($id, $qs, $post, $user) = @_;

open(TMP,">/tmp/upload.meta");
print TMP $post->{ctype} . "\n";
print TMP $post->{len} . "\n";
close(TMP);

open(TMP,">/tmp/upload.data");
print TMP $post->{data} . "\n";
close(TMP);


return (200, "application/json", { })
}


# get document image/thumbnail # get document image/thumbnail
sub api_v1_GET_documents_id_image { sub api_v1_GET_documents_id_image {
$data = $tmp; $data = $tmp;
} }


return $data;
return { ctype => $ct, len => $len, data => $data);
} }


sub sqlconnect { sub sqlconnect {

Loading…
Cancel
Save