???BUG??????JIRA?????????????
???????????? ???????[ 2015/5/8 11:24:44 ] ??????????????????
	????????????·???????汨??????????Jira 5.0.11??6.0.3?汾???????????????????????7?·??????????????????????μ????????
	???????????????????????????????????????????????????????????????webshell??????????????????????????????????????????С???????????Windows????????á?
	??????????
	?????????????????IssuesCollector???ò?????REST api?????????????????????????????????С?
	com/atlassian/jira/collector/plugin/rest/TemporaryAttachmentsResource.java
	[...]
	@POST
	@Path("multipart/{collectorId}")
	@Consumes({"multipart/form-data"})
	@Produces({"text/html"})
	public
	Response attachTemporaryFileViaForm(@PathParam("collectorId")
	String collectorId?? @MultipartFormParam("screenshot")
	Collection<filepart> fileParts) { ServiceOutcome outcome =
	this.collectorService.getCollector(collectorId);
	[...]
	FilePart
	filePart = (FilePart)fileParts.iterator().next();
	try
	{
	[...]
	TemporaryAttachment
	temporaryAttachment = createTemporaryAttachment(filePart.getName()??
	filePart.getContentType()?? filePart.getInputStream());
	temporaryAttachmentsMonitor.add(temporaryAttachment);
	context.put("temporaryAttachment"??
	temporaryAttachment);
	return
	Response.ok(renderTemplate("templates/rest/tempfilejson.vm"??
	context)).cacheControl(com.atlassian.jira.rest.v1.util.CacheControl.NO_CACHE).build();
	}
	catch
	(IOException e) {
	}
	return
	Response.serverError().cacheControl(com.atlassian.jira.rest.v1.util.CacheControl.NO_CACHE).build();
	}
	private
	TemporaryAttachment createTemporaryAttachment(String fileName?? String
	contentType?? InputStream inputStream)
	{
	File
	tmpDir = AttachmentUtils.getTemporaryAttachmentDirectory();
	long
	uniqueId;
	File
	tempAttachmentFile;
	do
	{
	uniqueId
	= getUUID();
	tempAttachmentFile
	= new File(tmpDir?? uniqueId + "_" + fileName);
	}
	while
	(tempAttachmentFile.exists());
	FileOutputStream
	output = null;
	try
	{
	output
	= new FileOutputStream(tempAttachmentFile);
	IOUtils.copy(inputStream??
	output);
	output.close();
	}
	catch
	(IOException e)
	{
	IOUtils.closeQuietly(output);
	log.error("Error
	creating temporary attachment"?? e);
	return
	null;
	}
	return
	new TemporaryAttachment(Long.valueOf(uniqueId)?? Long.valueOf(-1L)??
	tempAttachmentFile?? fileName?? contentType);
	}
	
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com