Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44446

Content-Type not set correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • s3-plugin
    • None
    • Jenkins 2.46.2
      S3 Plugin 0.10.12
      AWS SDK 1.11.119

      Using the following to upload a JSON file to S3 results in the Metadata Content-Type to be set to application/octet-stream

      step([$class: 'S3BucketPublisher', consoleLogLevel: 'INFO', dontWaitForConcurrentBuildCompletion: false, entries: [[
      bucket: 'x.x.tech',
      excludedFile: '',
      flatten: false,
      gzipFiles: false,
      keepForever: true,
      managedArtifacts: false,
      noUploadOnFailure: true,
      selectedRegion: 'eu-west-1',
      showDirectlyInBrowser: false,
      sourceFile: "path/**",
      storageClass: 'STANDARD',
      uploadFromSlave: false,
      useServerSideEncryption: true
      ]], pluginFailureResultConstraint: 'FAILURE', profileName: 'x-profile', userMetadata: []])
      

      However we'd like to set the Content-Type to application/json. I've had a look around and seen nothing, but looking in the code I see that this should be set automatically, Is there something I'm missing for this to be set correctly?

            jimilian Alexander A
            garfty Gareth Parker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: