Upload plugins
Upload plugins should be possible to be easly added and removed.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Sebastian "Nait" Kacprzak
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Not started
- Milestone target:
- None
- Started by
- Completed by
- Sebastian "Nait" Kacprzak
Related branches
Related bugs
Sprints
Whiteboard
Plugins should be scanned and loaded as lazy at possible. If we would have multiple plugins users would probably use only one plugin anyway on one run. I suggest registering a plugin for file type in database, and loading this plugin only when one of assigned files is uploaded. If loads fails, we could give info and ask to upload by other plugin accepting this file.(and turn off not working plugin in database)
proposed solution:
Singleton class with method that would get filetype,and would return uploader
1.method would check with database what plugin is associated with this filetype(remember it? there is a chance that database would be cached in RAM anyway), than check if its loaded
1a.if yes return it
1b. otherwise try to load it
1ba. if load succeeded remember it
1bb. if load failed, notify it*, set plugin as disabled in database, and repeat with next plugin associated with this filetype
*notification may be:
-blocking, requiring user to chose next plugin by himself
-non blocking, show ubuntu notification, and continue with another plugin