Web/Portal Technologies - JDE1 (MOSC)

MOSC Banner

JavaScript to Postman

Does anyone know how to translate this javascript function to Postiman?

(the code is from this document

Document 2720570.1 (oracle.com)

)


function uploadFile(file) {

var url = 'http://<AIS_Host>:<Port>/jderest/file/upload';

var xhr = new XMLHttpRequest();

var formData = new FormData();

xhr.open('POST', url, true);

xhr.setRequestHeader('Accept', 'application/json');

const moAdd =

{

username: "<User>",

password: "<Password>",

deviceName: "MyDevice",

ssoEnabled: false,

moStructure: "ABGT",

moKey:[

"939364"

],

formName: "P01012_W01012B",

version: "ZJDE0001",

file:{

fileName: "test.txt",

fileLocation: "C:\\test.txt",

itemName: "Test1",

sequence: 0

}

};

const json = JSON.stringify(moAdd);

formData.append('moAdd', new Blob([json], {type: "application/json"}));

formData.append('file', file);

xhr.onreadystatechange = function ()

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center