Question Nadirbek Nurlybekov · Oct 26, 2017

Content-Type in REST

Greetings to all!!!How to get the value of the Content-Type field from the object of the class %Stream.Object obtained with:

stream=% request.GetMimeData (FormDataName, 1)

I tried:

write stream.GetAttribute("Content-Type")write %request.Get("Content-Type")

but always returns a void, although it should be "image/jpeg", "application/pdf" or something like that.
In JS:

    var formData = new FormData();
    formData.append('file', element[0].files[0]);
    console.log(element[0].files[0].type);

The console of browser displays "image / jpeg", "application / pdf",  etc.

Comments

Jon Willeke · Oct 26, 2017

What is the value of %request.ContentType?

0