mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 15:25:22 +02:00
feat(image): upload local files for building image EE-3021 (#7507)
* support to make multiple files in archive buffer * upload files by multipart
This commit is contained in:
parent
a7d458f0bd
commit
d570aee554
6 changed files with 171 additions and 14 deletions
|
@ -33,6 +33,23 @@ angular.module('portainer.app').factory('FileUploadService', [
|
|||
});
|
||||
};
|
||||
|
||||
service.buildImageFromFiles = function (names, files) {
|
||||
var endpointID = EndpointProvider.endpointID();
|
||||
return Upload.upload({
|
||||
url: 'api/endpoints/' + endpointID + '/docker/build',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
data: { file: files },
|
||||
params: {
|
||||
t: names,
|
||||
},
|
||||
transformResponse: function (data) {
|
||||
return jsonObjectsToArrayHandler(data);
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
service.loadImages = function (file) {
|
||||
var endpointID = EndpointProvider.endpointID();
|
||||
return Upload.http({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue