· 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]);

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

Discussion (2)1
Log in or sign up to continue