Project

General

Profile

Actions

Bug #2566

closed

need to set filename for download files

Added by Matt Jones over 17 years ago. Updated over 15 years ago.

Status:
Resolved
Priority:
Immediate
Category:
metacat
Target version:
Start date:
10/17/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2566

Description

Currently metacat does not explicitly set the filename on downloaded files to anything sensible. Instead, it just uses a filename like 'metacat' for anything downloaded (except zip files, which are now named with a zip extension using the package id). The proper name for a data file should probably be the original entity name plus and appropriate extension based on the content type. A call like this would do the trick:

response.setHeader("Content-Disposition", "attachment; filename=" + docId
+ ".zip");

For XML files (including EML documents), its probably best to name the file using the pattern "namespace.id.rev.xml" or something similar. We also want to be sure we are setting the Content-type properly so browsers know how to deal with the downloaded file.


Related issues

Blocked by Metacat - Bug #3084: Need to be able to set filenames on data uploadsResolvedShaun Walbridge01/22/2008

Actions
Actions

Also available in: Atom PDF