17
17
18
18
const nuv = require ( 'nuv' ) ;
19
19
20
- const contentActionAddr = `${ process . env . APIHOST } /api/v1/web/whisk-system/nuv/content /${ process . env . NUVUSER } ` ;
20
+ const contentActionAddr = `${ process . env . APIHOST } /api/v1/web/whisk-system/nuv/devel_upload /${ process . env . MINIO_BUCKET_STATIC } ` ;
21
21
22
22
// *** Main ***
23
23
main ( ) ;
@@ -30,9 +30,8 @@ function main() {
30
30
let verbose = extractBoolFromParam ( verboseParam ) ;
31
31
let clean = extractBoolFromParam ( cleanParam ) ;
32
32
33
- let minioKey = `MINIO_SECRET_KEY` ;
34
33
35
- const minioAuth = process . env [ minioKey ] ;
34
+ const minioAuth = process . env . AUTHB64
36
35
37
36
const pathFoundAsDir = nuv . isDir ( path ) ;
38
37
if ( ! pathFoundAsDir ) {
@@ -66,15 +65,15 @@ function main() {
66
65
67
66
function uploadContent ( file , minioAuth , fileAddr , verbose ) {
68
67
console . log ( `Uploading ${ fileAddr } ...` ) ;
69
- let res = nuv . nuvExec ( "curl" , "-s" , "-X" , "PUT" , "-T" , file , "-H" , `minioauth : ${ minioAuth } ` , `${ contentActionAddr } /${ fileAddr } ` ) ;
68
+ let res = nuv . nuvExec ( "curl" , "-s" , "-X" , "PUT" , "-T" , file , "-H" , `x-impersonate-auth : ${ minioAuth } ` , `${ contentActionAddr } /${ fileAddr } ` ) ;
70
69
if ( verbose ) {
71
70
console . log ( res ) ;
72
71
}
73
72
}
74
73
75
74
function deleteContent ( minioAuth , fileAddr , verbose ) {
76
75
console . log ( `Deleting ${ fileAddr } ...` ) ;
77
- let res = nuv . nuvExec ( "curl" , "-s" , "-X" , "DELETE" , "-H" , `minioauth : ${ minioAuth } ` , `${ contentActionAddr } /${ fileAddr } ` ) ;
76
+ let res = nuv . nuvExec ( "curl" , "-s" , "-X" , "DELETE" , "-H" , `x-impersonate-auth : ${ minioAuth } ` , `${ contentActionAddr } /${ fileAddr } ` ) ;
78
77
if ( verbose ) {
79
78
console . log ( res ) ;
80
79
}
0 commit comments