import{upload,request,response}from"sdk/http";if(request.getMethod()==="POST"){if(upload.isMultipartContent()){constfileItems=upload.parseRequest();for(leti=0;i<fileItems.size();i++){constfileItem=fileItems.get(i);constcontentType=fileItem.getContentType();console.log(`Content Type: ${contentType}`);console.log(`Filename: ${fileItem.getOriginalFilename()}`);// console.log(`Text: ${fileItem.getText()}`);response.setContentType(contentType);response.write(fileItem.getBytesNative());}}else{response.println("The request's content must be 'multipart'");}}elseif(request.getMethod()==="GET"){response.println("Use POST request.");}response.flush();response.close();