Comments (3)
http://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file
from repositorytools.
This should work:
data = {
'g':local_artifact.group,
'a':local_artifact.artifact,
'v':local_artifact.version,
'p':local_artifact.extension,
'r':repo_id
}
files = {'file': f}
self._send('service/local/artifact/maven/content', method='POST', data=data, files=files)
The Content-Type header must contain multipart/form-data
.
from repositorytools.
The Content-Type header CANNOT be passed as it has to contain also boundary, which is always generated by requests. Spent few hours to find this out
from repositorytools.
Related Issues (20)
- automatically release to pypi
- custom metadata: new nexus (>=2.12) returns 403 if extension is missing in coordinates
- artifact upload: add option --classifier
- regression: all commands return exit code 1 HOT 5
- with the REST api uploads, the uploads aren't streamed anymore HOT 2
- upload: failing when using REST and specifying version explicitly
- scripts don't work on windows and venv well - use console_scripts in setup.py
- [cli] upload: allow user to switch between rest and plain old PUT
- Wrong number of arguments potentially passed to CLI.run method HOT 1
- Last Release version supports Nexus OSS 3.2.1-01? HOT 4
- repo close: fail if it doesn't manage to close it
- AttributeError: 'dict_items' object has no attribute 'append' HOT 2
- AttributeError: 'Namespace' object has no attribute 'func' HOT 4
- upload artifacts as bundle HOT 1
- staging: allow specifying staging profile name HOT 2
- Upload artifact : manage classifier HOT 5
- Version regexp match fails on artifacts with numbers HOT 6
- artifact upload fails when uploaded file's name does not match GAV specified in arguments
- What kind of repositories are supported? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repositorytools.