fixed add metadatatype in frontend. Now sends a JSON request, rather than a multipart form request