Skip to content

FileDataStorage doesn't store file with correct name #3

@matthiasgebhardt

Description

@matthiasgebhardt

Following both methods don't consider the given key-Parameter for creating the file-name:
public func store(data: Data, forKey key: String) -> Bool
and
public func data(forKey key: String) -> Data?

Instead it looks like an incomplete implementation, where each method defines the file-path by setting a static file-name: "key.md5"

let fileUrl = baseUrl.appendingPathComponent("key.md5")

Discussion
As the current implementation suggests, it should be used a MD5-hashed key for the file-name. The Question is: do we want to implement a md5-hash-function directly or do we want to use it from bytes. The later solution unfortunately would make the RemoteSettings pod dependent of the bytes pod.

Whats your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions