mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 18:59:41 +02:00
fix: 2.21.5 backported fixes (#251)
Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: Oscar Zhou <100548325+oscarzhou-portainer@users.noreply.github.com> Co-authored-by: oscarzhou <oscar.zhou@portainer.io>
This commit is contained in:
parent
835a7e41e6
commit
be3cb0690c
3 changed files with 54 additions and 34 deletions
|
@ -57,10 +57,15 @@ export async function buildImageFromDockerfileContentAndFiles(
|
|||
const dockerfile = new Blob([content], { type: 'text/plain' });
|
||||
const uploadFiles = [dockerfile, ...files];
|
||||
|
||||
const formData = new FormData();
|
||||
uploadFiles.forEach((file, index) => {
|
||||
formData.append(`file${index}`, file);
|
||||
});
|
||||
|
||||
return buildImage(
|
||||
environmentId,
|
||||
{ t: names },
|
||||
{ file: uploadFiles },
|
||||
formData,
|
||||
'multipart/form-data'
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue