Rename types to category in json.
Support direct URL uploading for attachments.