Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

I. Problem

The current system only supports file image upload. There are many issues will arise with it in the future. Because the image upload API can only handle Post request which makes it not restful api. The first sub-task is to make image upload api become restful. So any person can query  for an image with an ID and it will return URL pointing to the location of that image. The functionality of the image api will stay the same, but it will be easier for admin to delete image that is not being referenced anywhere in platform.

II. Idea

In the near future with the introduction of badges and documents upload, we will need a attachment system for user to easy manage all their  content uploaded. The design of the system will include another field in person schema which will be an array of attachments. So user can reused their uploaded assets for new opportunity, 

A person record will contains a lot of attachments which could be CV file, avatar, banner profile image, etc. This could be easier for user to have a page that they can manage things that they uploaded. The idea of attachment management system comes from CMS where user can upload or remove attachment uploaded.

III .  Proposed Solution

Create  a new database schema to help user to manage all file they uploaded. 


Attachment schema for Mongo DB:

FieldDescription
IDAuto generated by Mongoose
File NameWhen user upload a file or multiple files, each of the file will have a name of it. This will be useful for user to remember what file they have uploaded
Type For simplicity, we will only have 2 type which are documents and pictures. The field cloud be an enum type of those 2
MetaData

This meta data will contain information such as id of user who upload the image, the date and time of the file uploaded. Meta data will be helpful when u23322ser deleted from the system. The system would just find  all reference of the that user id  and delete all database record about it

  • No labels