Cobefile

A multipurpose media meta data generator.

Installation

dependencies:
  cobefile: ^0.0.2

Usage

First make your global variable, we suggest you to create a file who all the app code can access

globals.dart

import 'package:cobefile/cobefile.dart';

// Replace the strings appId and apiKey with the actual values
CobeFile cobefile = CobeFile(
    'appId', 'apiKey');

In other parts of the app code if you want to upload and get the multiple optimal sizes of a file (thumbnails), use cobefile method upload. In the http response you should get the values in url form.

other.dart

import 'package:cobefile/cobefile.dart';

//values: 'avatar', 'post', 'video', others...
var type = 'avatar';

//values: enum FileTypeCobe { image, video }
var fileTypeCobe = FileTypeCobe.image;

Map<String, dynamic> _response = await cobefile.upload(
          file.path, type , fileTypeCobe);

License

MIT

Libraries

cobefile