airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <>
Subject [jira] [Commented] (AIRAVATA-3281) Capture and use mime-type for input and output files
Date Mon, 06 Jan 2020 17:57:00 GMT


ASF subversion and git services commented on AIRAVATA-3281:

Commit 3fe559a9efabbd921aedccfb23c79c4d762e506b in airavata-django-portal's branch refs/heads/develop
from Marcus Christie
[;h=3fe559a ]

AIRAVATA-3281 Display thumbnail when image

> Capture and use mime-type for input and output files
> ----------------------------------------------------
>                 Key: AIRAVATA-3281
>                 URL:
>             Project: Airavata
>          Issue Type: Bug
>          Components: Django Portal
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>            Priority: Major
> h2. Proposal
> - store {{mime-type}} in {{DataProduct.productMetadata}}
> - For input files, {{mime-type}} value is whatever is present in the upload request.
(Perhaps can also come from application interface's {{InputDataObjectType.metaData['file-metadata']}}).
> - For output files, {{mime-type}} value comes from {{OutputDataObjectType.metaData['file-metadata']}}.
When output data staging register the DataProduct, it will need to read the OutputDataObjectType.metaData
and copy the file-metadata to the DataProduct's productMetadata
> - in Django portal, when downloading data product, if metadata has {{mime-type}} then
use that as the content type. Otherwise, set the content type to {{application/octet-stream}}
and add a {{Content-Disposition}} header with value {{attachment; filename=...}} (which is
what is currently happening all the time).
> h3. Other details
> - Django portal should retain DataProduct metadata when moving or copying input files
> - The DataProduct download URL will accept a {{download}} query param to force download
even when there is a mime-type in metadata
> - image outputs can be displayed inline
> - if there is no mime-type for a file, try to guess based on file extension (using [mimetypes|]
Python module)
> h3. TODO
> - [x] Capture mime-type when files are uploaded
> -- input files
> -- data store files, XHR upload
> -- data store files, tus upload
> - [x] copy metadata when input files are moved/copied in storage
> - [x] images can be displayed inline
> - [x] In backend, copy mime-type to {{DataProduct.productMetadata}} when registering
output file
> - [x] fallback on guessing mime-type based on file extension
> - [x] only allow viewing/previewing files with known mime-type
> - [x] when browser says file is application/octet-stream, check if it is text by trying
to read it as unicode ( and if so set to text/plain
> - [ ] add an button to download the file?
> h3. Testing
> - mime-type is copied for input files when experiment is cloned
> - mime-type is added to DataProduct for output files by the OutputDataStagingTask when
it is provided in OutputDataObjectType.metaData
> - image outputs are displayed inline in Experiment Summary (requires an application that
generates image outputs)

This message was sent by Atlassian Jira

View raw message