eclipse-hawkbit / hawkbit-extensions

Eclipse Public License 2.0
20 stars 30 forks source link

set s3 content-disposition filename metadata #12

Closed michahirsch closed 6 years ago

michahirsch commented 6 years ago

Set the original filename to the S3 metadata into the W3 HTTP header Content-Disposition

This will automatically set the original-filename when downloading the file as the files are stored with their SHA1-hash.

Disadvantage you cannot upload the same file for the same tenant with the same hash-value as the file would not be updated and you cannot store multiple files with the same hash with different Content-Disposition meta-data. This would lead that you retrieve always the first uploaded original file value to the specific hash.

Signed-off-by: Michael Hirsch michael.hirsch@bosch-si.com

michahirsch commented 6 years ago

I think the best solution would be in hawkBit to define the SHA1/filename combination unique in JpaArtifact.

with this constraint the pull-request is then valid to set the Content-Disposition header to the S3 file.

But it's maybe a little bit weird that you cannot upload then the same file to different software modules then with this constraint.