Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typed blobs #729

Merged
merged 2 commits into from
Oct 22, 2019
Merged

Typed blobs #729

merged 2 commits into from
Oct 22, 2019

Commits on Oct 21, 2019

  1. Introduce a BlobObject type for blobs

    This creates a specific type for blobs, with well defined conversions
    at the borders.  It also introduces a strong type for the Param::File
    value since that param is often used used by the public API to set
    filenames using absolute paths, but then core changes the param to a
    blob before it gets to the database.
    
    This eliminates a few more functions with very mallable C-like
    arguments behaviour which combine a number of operations in one.
    Because blob filenames are stored so often in arbitrary strings this
    does add more code when receiving those, until the storage is fixed.
    
    File name sanitisation is now deletated to the sanitize-filename crate
    which should do a slightly better job at this.
    Floris Bruynooghe committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    2eb70f2 View commit details
    Browse the repository at this point in the history
  2. Add Params::get_file(), ::get_path() and ::get_blob()

    Turns out that anyone that uses these either justs wants a file or
    wants a blob.  Consolidate those patterns into one place and simplify
    all the callers.
    Floris Bruynooghe committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    e6b8097 View commit details
    Browse the repository at this point in the history