X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fhelper-api.c;fp=src%2Fhelper-api.c;h=12539978f5eb87c077e0d0474b4e99daa565a701;hb=b2247ca634420ed0d5ecc1743834ea4e0666aa2a;hp=a166027a4aa6d638a0d451585e5f6450ea6ba627;hpb=d809e9b8fc03a0a08060034c6ddbd4b4c4176399;p=src%2Fapp-framework-binder.git diff --git a/src/helper-api.c b/src/helper-api.c index a166027a..12539978 100644 --- a/src/helper-api.c +++ b/src/helper-api.c @@ -93,6 +93,18 @@ PUBLIC AFB_PostCtx* getPostContext (AFB_request *request) { return ((AFB_PostCtx*) postHandle->ctx); } +PUBLIC char* getPostPath (AFB_request *request) { + AFB_PostHandle *postHandle = getPostHandle(request); + AFB_PostCtx *postFileCtx; + + if (postHandle == NULL) return NULL; + + postFileCtx = (AFB_PostCtx*) postHandle->ctx; + if (postFileCtx == NULL) return NULL; + + return (postFileCtx->path); +} + PUBLIC json_object* getPostFile (AFB_request *request, AFB_PostItem *item, char* destination) { AFB_PostHandle *postHandle = getPostHandle(request);