Correct mimetype for Google Drive project exports (#2829)
Fixes #2797. Changes mimetype from zip to gzip and adds .tar.gz extension to the name.
This commit is contained in:
parent
139019f6e3
commit
de2c2aa778
@ -167,10 +167,10 @@ public class UploadCommand extends Command {
|
|||||||
contentHints.setThumbnail(tn);
|
contentHints.setThumbnail(tn);
|
||||||
|
|
||||||
File fileMetadata = new File();
|
File fileMetadata = new File();
|
||||||
fileMetadata.setName(name)
|
fileMetadata.setName(name + ".tar.gz")
|
||||||
.setDescription(METADATA_DESCRIPTION)
|
.setDescription(METADATA_DESCRIPTION)
|
||||||
.setContentHints(contentHints);
|
.setContentHints(contentHints);
|
||||||
FileContent projectContent = new FileContent("application/zip", filePath);
|
FileContent projectContent = new FileContent("application/x-gzip", filePath);
|
||||||
File file = GoogleAPIExtension.getDriveService(token)
|
File file = GoogleAPIExtension.getDriveService(token)
|
||||||
.files().create(fileMetadata, projectContent)
|
.files().create(fileMetadata, projectContent)
|
||||||
.setFields("id")
|
.setFields("id")
|
||||||
|
Loading…
Reference in New Issue
Block a user