removed hardcoded deviceName

application-manager-new
Shabirmean 9 years ago
parent 9070110818
commit c37a97d7b4

@ -302,12 +302,12 @@ public class VirtualFireAlarmService {
@GET @GET
@Produces("application/octet-stream") @Produces("application/octet-stream")
public Response downloadSketch(@QueryParam("owner") String owner, public Response downloadSketch(@QueryParam("owner") String owner,
// @QueryParam("deviceName") String customDeviceName, @QueryParam("deviceName") String customDeviceName,
@PathParam("sketch_type") String sketchType) { @PathParam("sketch_type") String sketchType) {
ZipArchive zipFile = null; ZipArchive zipFile = null;
try { try {
zipFile = createDownloadFile(owner, "SMEANS FireAlarm", sketchType); zipFile = createDownloadFile(owner, customDeviceName, sketchType);
Response.ResponseBuilder rb = Response.ok(zipFile.getZipFile()); Response.ResponseBuilder rb = Response.ok(zipFile.getZipFile());
rb.header("Content-Disposition", rb.header("Content-Disposition",
"attachment; filename=\"" + zipFile.getFileName() + "\""); "attachment; filename=\"" + zipFile.getFileName() + "\"");

Loading…
Cancel
Save