anchi wrote: > No it is not corrupted, I've uploaded it through Guvnor web console. When I > download it directly through Guvnor UI, I get a valid file. > > Also when I reach it through REST API using: > http://{guvnor_url}/rest/packages/{package}/assets/{xls_name}/binary , I > also get a valid file. > > The only case when I get a corrupted file is when I use: > http://{guvnor_url}/rest/packages/{package}/assets/{xls_name}/source > > I have adjusted my application to check for this special case, and when file > extension is .xls i use /binary URL (for other assets I'm using /source > url), but I'm still interested on how to get xls through REST api using > http://{guvnor_url}/rest/packages/{package}/assets/{xls_name}/source > > Hi it is not safe to get the binary content by using http://{guvnor_url}/rest/packages/{package}/assets/{xls_name}/source. As the Guvnor has no idea what charset encoding is used by that binary file. When Guvnor converts the binary to a String representation, it can only use the platform default charset. If this is the different encoding than the original one, then your file will be corrupted. Make sure you use http://{guvnor_url}/rest/packages/{package}/assets/{xls_name}/binary instead to retrieve the binary content.
Cheers, Jervis > -- > View this message in context: > http://drools.46999.n3.nabble.com/Guvnor-REST-API-and-XLS-decision-tables-tp3985574p3996565.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
