Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload artifact to existing deployment includes headers in file content #2399

Open
szogun1987 opened this issue Aug 1, 2024 · 3 comments
Open

Comments

@szogun1987
Copy link

I have converted this article to use curl:

# Upload file content
curl -v -X PUT -F [email protected] -H "X-Octopus-ApiKey: ${OCTOPUS_API_KEY}" "${uploadUrl}"

Unfortunatelly it includes http part data:

--------------------------246875bc4e54cce7
Content-Disposition: form-data; name="fileData"; filename="report.html"
Content-Type: text/html

<!DOCTYPE html>
<html lang="en">

This is big issue for binary files, I can live with it for text ones.

Probably it is issue with octopus itself not with documentation so please move this issue to the right place.

@steve-fenton-octopus
Copy link
Contributor

steve-fenton-octopus commented Aug 6, 2024

Hi @szogun1987

The -F flag emulates a filled in form, which may be causing that to happen.

Can you try using the --data-binary flag to see if it resolves your issue?

curl -v \
  -X PUT \
  --data-binary @report.html \
  -H "X-Octopus-ApiKey: ${OCTOPUS_API_KEY}" \
  "${uploadUrl}"

@steve-fenton-octopus steve-fenton-octopus changed the title Upload artifact to existing deployment includes headers in flie content Upload artifact to existing deployment includes headers in file content Aug 7, 2024
@szogun1987
Copy link
Author

Thank you @steve-fenton-octopus now there is no extra initial bytes. But content is truncated.
HTML was only example I upload tar.gz file with screenshots

@steve-fenton-octopus
Copy link
Contributor

Hi @szogun1987

I've asked our R&D team to take a look at this one. I'll let you know the outcome as soon I hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants