mendix / RestServices

REST service module for Mendix. Supports consuming and publishing REST based services and real-time data synchronization. Supports JSON, form-encoded, multipart and binary data transport.
Apache License 2.0
31 stars 46 forks source link

Set file length of file output #30

Closed jveldhuizen closed 10 years ago

jveldhuizen commented 10 years ago

If you download a file, you want to know the file name, via the Content-Length header.

mweststrate commented 10 years ago

Hi Jonathan,

In that case you can combine the 'getFileSize' and 'setResponseHeader' actions to get the right filesize.

I'm not sure whether this should be done automatically, since there is no efficient way to get the filesize of a filedocument (the mentioned 'getFileSize' action just reads & counts the entire file stream)

mweststrate commented 10 years ago

Closed, since there is currently no efficient way in Mendix to implement this, so it should be default behavior and the work-around described above is easy to implement by anyone.