Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Multifile upload support #20

Merged
27 commits merged into from
Sep 26, 2016
Merged

Multifile upload support #20

27 commits merged into from
Sep 26, 2016

Commits on Sep 23, 2016

  1. use form for multifile uploads

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    c2edf90 View commit details
    Browse the repository at this point in the history
  2. sld config working

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    863d5f0 View commit details
    Browse the repository at this point in the history
  3. move validators to validators.py get tests working

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    c1cc19a View commit details
    Browse the repository at this point in the history
  4. all tests passing with new multi-uploader

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    22cc4d1 View commit details
    Browse the repository at this point in the history
  5. flake cleanup

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    f3d512c View commit details
    Browse the repository at this point in the history
  6. add migration

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    6df6811 View commit details
    Browse the repository at this point in the history
  7. calculate total size for upload, rather than first file

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    b6b790e View commit details
    Browse the repository at this point in the history
  8. flake 8 fix

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    0c99c73 View commit details
    Browse the repository at this point in the history
  9. fix cleaned_file reference in form validation

    david.w.bitner authored and sarasafavi committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    3bf7f58 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2016

  1. re-enable tests that were commented out

    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    01df9be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    66466cd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    27e6771 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6694104 View commit details
    Browse the repository at this point in the history
  5. various little refactors

    variable name: b -> bundle
    and other variable names:
    uploadid -> upload_id, uploadobj -> upload_obj, cnt -> count
    uf -> uploadfile
    
    make import_layer explicitly take pk kwarg:
    since this method is only using kwargs to get pk, we might as well extract pk
    early and default it to None instead of using kwargs.get.
    I actually would prefer pk to be a required arg and to dispense with **kwargs,
    so we have a real signature that can check us when we make mistakes; but that
    will have to depend on an analysis of where these methods are used
    
    pass request as Bundle arg instead of setting attr after
    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    d386e0a View commit details
    Browse the repository at this point in the history
  6. Add timestamp to dates header for uploaded files

    This can help a little to make uploads more distinguishable when they don't
    have different names.
    sarasafavi authored and Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    109ae4d View commit details
    Browse the repository at this point in the history
  7. don't reset self.size to zero

    sarasafavi authored and Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    838c435 View commit details
    Browse the repository at this point in the history
  8. set upload size at ingestion, not first use

    also permit null file_size for UploadedData.
    Sometimes an upload doesn't have a size (maybe it didn't finish uploading).
    In that case, it is not really sensible to say it is 0 bytes.
    It has no size.
    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    6ffb63b View commit details
    Browse the repository at this point in the history
  9. set upload name and file type where feasible

    Since some of the multifile and geopackage changes, it is no longer obvious
    what should be the name of an upload. If it just contains one file, we can do
    as before, but otherwise things can become more difficult.
    
    The heuristics for this are a little complex, so they've been split off into
    their own method and tests created just for this method.
    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    a72af51 View commit details
    Browse the repository at this point in the history
  10. set layer file_type and present in template

    No longer possible just to assume that there is one upload file type and it is
    the same file type as a layer, so we need to detect the actual file type, store
    it in the database and present it to users.
    
    - add to api
    - add to UploadLayer as property
    - add to UploadFile as field
    - add the migration to make the column
    - set it from the form processing
    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    d68c66b View commit details
    Browse the repository at this point in the history
  11. add file_name to api using UploadLayer property

    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    3568f6a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b97141e View commit details
    Browse the repository at this point in the history
  13. add layer.layer_name

    to api, UploadLayer, set in form processing, migration to add column.
    
    layer.name keeps filename info that is used to import, so we can't stuff actual
    layer names (e.g. from inside gpkg) there without breaking import. If we change
    both, any existing databases will be storing a different kind of information in
    that field, which may be confusing. We can deprecate layer.name if we need to.
    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    d9567b3 View commit details
    Browse the repository at this point in the history
  14. show both layer name and file name in upload list

    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    428e38f View commit details
    Browse the repository at this point in the history
  15. don't break alignment from absent layer.status

    Sasha Hart committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    75e847a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8ba6eb1 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    fd40e26 View commit details
    Browse the repository at this point in the history
  18. Use list of valid extensions to populate text in the upload template

    Whether extensions are explicitly specified in settings, or else just
    the default list of extensions is used, we should consider
    importers.VALID_EXTENSIONS as canon and use that in user-facing templates
    sarasafavi committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    39522d2 View commit details
    Browse the repository at this point in the history