Upload Microsoft Excel Spreadsheet template to Cloud Storage in JAVA issue with Aspose.Cells Cloud

Hi Aspose’s Support,

I have converted Excel to Pdf as following sample :
https://docs.aspose.cloud/display/cellscloud/Convert+Excel+Workbook+to+Different+File+Formats

I
have been noticed that we can’t upload excel template files to Aspose’s
Server today (20-July from 08:21’ GMT+07 to 09:07’ GMT+07). Do you know what wrong with it in
that time ?

There are some error messages I have received from Aspose’s Server :
{“Message”:“An error occurred while executing the command definition. See the inner exception for details.”}
or
{“Message”:“An error occurred while updating the entries. See the inner exception for details.”}


Here is the Java code about upload file to Aspose’s Server :

/**
* Upload file into server Aspose
*
* @param data
* @param uploadUrl
* @return
*/
private static String uploadFile(byte[] data, String uploadUrl,
Map<String, Object> outputData) {

try {
URL url = new URL(uploadUrl);
HttpURLConnection m_connection;
m_connection = (HttpURLConnection) url.openConnection();

// Increase the Connection Timeout
m_connection.setConnectTimeout(3 * 60 * 1000);

m_connection.setDoOutput(true);
m_connection.setRequestMethod(“PUT”);
m_connection.setRequestProperty(“Accept”, “text/json”);
m_connection.setRequestProperty(“Content-Type”,
“MultiPart/Form-Data”);
m_connection.setRequestProperty(“Content-length”, “” + data.length);
m_connection.connect();
java.io.OutputStream out = new BufferedOutputStream(
m_connection.getOutputStream());
out.write(data);
out.flush();

InputStream response = m_connection.getInputStream();
String res = com.saaspose.common.Utils.StreamToString(response);
response.close();
out.close();
m_connection.disconnect();

if (null != outputData) {
outputData.put(“resultUpload”, res);
}

// Parse result of uploading file for checking errors
JSONObject objResult = new JSONObject(res);
// {“Code”:200,“Status”:“OK”}
String code = objResult.getString(“Code”);
String status = objResult.getString(“Status”);
if (false == “200”.equalsIgnoreCase(code)) {
throw new Exception(“Code of upload != 200”);
}
if (false == “OK”.equalsIgnoreCase(status)) {
throw new Exception(“Status of upload != OK”);
}

return res;
} catch (Exception e) {
String exInfo = Utils.exceptionToString(e);
// e.printStackTrace();
log.severe("Exception in upload file : " + exInfo);

if (null != outputData) {
outputData.put(“exception”, exInfo);
}
return null;
}
}

Thanks,
Chien

Hi Chien,

We have investigated this issue and found that this exception was appearing during database update on that time. We have logged this issue for future database updates and will make sure this does not affect the customers during future updates.

We are sorry for the inconvenience.

Best Regards,

Hi muhammad.ijaz is not online. Last active: 10-07-2015, 4:16 AM
Muhammad,

I
have been noticed that we can’t upload excel template files to Aspose’s
Server today (07-Oct from 01:34 AM GMT+07 to 01:39 AM GMT+07). Please tell me what’s wrong with it.

Thanks,
Chien

Hi Chien,

Yes, service was interrupted at that time because of IIS crash which took five minutes to restore. We are sorry for the inconvenience.

Best Regards,

Hi Muhammad,

The problem is happening again now.
Please look at this urgently.
I is causing our report services stopped working.

Thanks,
Tuan

We need this resolved asap. Thanks.

A fix was deployed to production and the reported problems are now solved.
We
apologize for the unusually long period until the issue was cleared
out. It was a tough technical problem and we have been working
continuously to get it done.

@Tuan_Dao

Just as an update. Please note since API Version V3, we have introduced new methods in Aspose.Cells Cloud API for storage related operations. Now you do not need to use Aspose.Storage Cloud API for the purpose. Please check following code sample to upload a file to cloud storage.

// Get App Key and App SID from https://dashboard.aspose.cloud/
CellsApi api = new CellsApi("xxxxx-xxxx-xxxx-xxxx-xxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
File file = new File("C:/Temp/Test.xlsx"));
	try {
		api.uploadFile( "Temp/Test.xlsx", file, null);
	} catch (ApiException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}