Skip to content
Browse files

Changed the Mypic file-upload code to account for the xspupload dir

property being null, which is apparently the case when it hasn't been
explicitly overriden
  • Loading branch information...
1 parent 6f8e3f0 commit 26052a008a8c18d1eac21c336cb25a0d9ea976d9 @jesse-gallagher jesse-gallagher committed Dec 19, 2012
View
5 disk-collaborationtoday/Code/Java/com/ZetaOne/mypic/Api.java
@@ -465,6 +465,9 @@ public String retrieveImage() {
// Don't assume that xspupload is in the data directory
String xspupload = ExtLibUtil.getStringProperty(ExtLibUtil.getXspContext(), "xsp.persistence.dir.xspupload");
+ if(xspupload == null) {
+ xspupload = ".";
+ }
File outputfile = new File(xspupload + File.separator + fileName);
ImageIO.write(dst, "png", outputfile);
@@ -491,7 +494,7 @@ public String retrieveImage() {
rtItem.embedObject(
EmbeddedObject.EMBED_ATTACHMENT,
"",
- xspupload + File.separator + fileName,
+ outputfile.getAbsolutePath(),
""
);
rtItem.compact();
View
18 disk-collaborationtoday/Code/Java/com/ZetaOne/mypic/Api.java.metadata
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?><note class="form" maintenanceversion="3.0" replicaid="85257AA6004F5595" version="8.5" xmlns="http://www.lotus.com/dxl">
-<noteinfo noteid="4d2" sequence="1" unid="F351973A81CB665F85257AB6007CE1C2">
-<created><datetime>20121114T174402,58-05</datetime></created>
-<modified><datetime>20121114T174402,80-05</datetime></modified>
-<revised><datetime>20121114T174402,78-05</datetime></revised>
-<lastaccessed><datetime>20121114T174402,78-05</datetime></lastaccessed>
-<addedtofile><datetime>20121114T174402,78-05</datetime></addedtofile></noteinfo>
-<updatedby><name>CN=Jesse Gallagher/O=Frost</name><name>CN=Jesse Gallagher/O=MTC</name><name>CN=Jesse Gallagher/O=Frost</name></updatedby>
-<wassignedby><name>CN=Jesse Gallagher/O=MTC</name></wassignedby>
+<?xml version="1.0" encoding="UTF-8"?><note class="form" replicaid="85257AD1004C558E" version="9.0" xmlns="http://www.lotus.com/dxl">
+<noteinfo noteid="39a" sequence="12" unid="2EB34D92F17F222C85257AD1004C5CF1">
+<created><datetime>20121211T085405,29-05</datetime></created>
+<modified><datetime>20121219T172242,56-05</datetime></modified>
+<revised><datetime>20121219T172242,54-05</datetime></revised>
+<lastaccessed><datetime>20121219T172242,54-05</datetime></lastaccessed>
+<addedtofile><datetime>20121211T085405,30-05</datetime></addedtofile></noteinfo>
+<updatedby><name>CN=Jesse Gallagher/O=Frost</name></updatedby>
+<wassignedby><name>CN=Jesse Gallagher/O=Frost</name></wassignedby>
<item name="$Flags"><text>34567Cg~[</text></item>
<item name="$TITLE"><text>com/ZetaOne/mypic/Api.java</text></item>
View
2 disk-collaborationtoday/WebContent/WEB-INF/faces-config.xml
@@ -60,6 +60,6 @@
<renderer-class>com.ZetaOne.mypic.MypicCardRenderer</renderer-class>
</renderer>
</render-kit>
- <!--AUTOGEN-START-BUILDER: Automatically generated by IBM Lotus Domino Designer. Do not modify.-->
+ <!--AUTOGEN-START-BUILDER: Automatically generated by IBM Domino Designer. Do not modify.-->
<!--AUTOGEN-END-BUILDER: End of automatically generated section-->
</faces-config>

0 comments on commit 26052a0

Please sign in to comment.
Something went wrong with that request. Please try again.