Do not input private or sensitive data. View
Qlik Privacy & Cookie Policy.
Skip to main content
Unlock a world of possibilities!
Login
now and discover the exclusive benefits awaiting you.
Expand
Move to Qlik Cloud
Forums
Support
Discover
Blogs
Events
Qlik.com
Qlik Help
Resources
Qlik.com
|
Qlik Help
|
Resources
All community
This category
This board
Knowledge base
Users
Products
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Ask a Question
Help
Sign In / Register
All community
This category
This board
Knowledge base
Users
Products
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour!
Register Now
Qlik Community
:
Discover
:
About
:
Water Cooler
:
Import app through JS
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
All community
This category
This board
Knowledge base
Users
Products
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
saranrajk
Contributor II
2018-11-27
01:46 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
Import app through JS
var
https
=
require
(
'https'
);
var
fs
=
require
(
'fs'
);
async
function
getfile
(
file
) {
return
await
fs
.
readFileSync
(
file
);
}
// console.log( Promise.resolve(getfile("./2018 R&D Pipeline.qvf")))
// console.log(fs.readFileSync('2018 R&D Pipeline.qvf'))
var
options
=
{
hostname:
'{host-name}'
,
port:
4242
,
path:
'/qrs/app/upload?xrfkey=12345678qwertyui&name=my_app_from_local'
,
method:
'POST'
,
headers:
{
'x-qlik-xrfkey'
:
'12345678qwertyui'
,
'X-Qlik-User'
:
'UserDirectory={user-directory} UserId= {user-id} '
,
"Content-Type"
:
"application/vnd.qlik.sense.app"
,
// "Connection" : "Keep-Alive"
},
body:
fs
.
readFileSync
(
'2018 R&D Pipeline.qvf'
),
// options: { filename: '2018 R&D Pipeline.qvf'} } ,
key:
fs
.
readFileSync
(
"C:/ProgramData/Qlik/Sense/Repository/Exported Certificates/DESKTOP-J7IPQ7H/client_key.pem"
),
cert:
fs
.
readFileSync
(
"C:/ProgramData/Qlik/Sense/Repository/Exported Certificates/DESKTOP-J7IPQ7H/client.pem"
),
ca:
fs
.
readFileSync
(
"C:/ProgramData/Qlik/Sense/Repository/Exported Certificates/DESKTOP-J7IPQ7H/root.pem"
)
};
https
.
get
(
options
,
function
(
res
) {
console
.
log
(
"Got response: "
+
res
.
statusCode
);
res
.
on
(
"data"
,
function
(
chunk
) {
// console.log({'hello' : "" + JSON.stringify(chunk)});
obj_from_qlik
=
chunk
.
toString
(
'utf8'
)
console
.
log
(
obj_from_qlik
)
// to_json = JSON.parse(obj_from_qlik)
// to_json.map(async(data)=>{
// console.log(data)
// })
});
}).
on
(
'error'
,
function
(
e
) {
console
.
log
(
"Got error: "
+
e
.
message
);
});
when I', trying to import app using this code it show me an error as invalid APP,
can anyone help me to get rid of this, thank you
Ditto - same here!
All forum topics
Previous Topic
Next Topic
0 Replies
Post Reply
Tags
post migration issue
community
qlikview
qlik
moderation
bug
email
migration
qlikcommunity
bookmarks
community_help
dimension
links
profile
qonnections 2019
account
chart
google
server
settings
View All ≫
Community Browser
Discover
Qlik Gallery
Explore Qlik Gallery
Programs
Qlik Education
Qlik Academic Program
About Qlik Community
Resources