java - How to save a file in Bluemix server? -
i deployed servlet in bluemix (bluemix-liberty) saves file (sent ui) in bluemix server. used below code getting permission denied exception:
diskfileitemfactory filefactory = new diskfileitemfactory(); file filesdir = new file("/"); filefactory.setrepository(filesdir); this.uploader = new servletfileupload(filefactory);
i getting following exception:
exception in uploading file. processing of multipart/form-data request failed. /upload_3d1b2086_152b5c954a4__8000_00000000.tmp (permission denied)
is there option permission save file in bluemix or other way save file in bluemix server? in advance.
as commenters pointed out, better store files using service called cf app instance. 1 flexible candidate objectstorage service. example on how store , retrieve files in java can found here: https://developer.ibm.com/recipes/tutorials/connecting-to-ibm-object-storage-for-bluemix-with-java/ approach store file attachment in cloudant nosql db. bluemix java or node.js cloudant boilerplate shows example: https://console.eu-gb.bluemix.net/catalog/starters/java-cloudant-web-starter/
Comments
Post a Comment