<commit_before>//
//  Uploadable.swift
//  FirebaseCommunity
//
//  Created by <NAME> on 15/08/17.
//

import Foundation

public protocol Uploadable {
    
    var path: String? { get set }
    var data: Data? { get }
    
    func upload(fileName: String, path: String)
}<commit_msg>Add progress method to uploadable protocol<commit_after>//
//  Uploadable.swift
//  FirebaseCommunity
//
//  Created by <NAME> on 15/08/17.
//

import Foundation

public typealias ProgressObserver = (_ progress: Double) -> Void

public protocol Uploadable {
    
    var path: String? { get set }
    var data: Data? { get }
    
    func upload(fileName: String, path: String, onProgress: ProgressObserver?)
    func observeUploadProgress(onProgress: @escaping (_ progress: Double) -> Void)
}
{'fraction_non_alphanumeric': 0.11583011583011583, 'fraction_numerical': 0.015444015444015444, 'mean_word_length': 3.0520833333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5445863', 'n_tokens_mistral': 252, 'n_tokens_neox': 235, 'n_words': 73}