- // This is the 1st Item iteration let's open output file and allocate necessary resources
- if (appCtx == NULL) {
- // Create an application specific context
- appCtx = calloc (1, sizeof(appPostCtx)); // May place anything here until post->completeCB handle resources liberation
- appCtx->path = strdup (filepath);
-
- // attach application to postHandle
- postHandle->ctx = (void*) appCtx; // May place anything here until post->completeCB handle resources liberation
-
- // Allocate an application specific handle to this post
- strncpy (filepath, request->config->sessiondir, sizeof(filepath));
- strncat (filepath, "/", sizeof(filepath));
- strncat (filepath, item->filename, sizeof(filepath));
+ // upload multi iteration logic is handle by getPostedFile
+ return (getPostFile (request, item, destination));
+}