Search in sources :

Example 1 with CreateImageUploadUrlAjaxPageData

use of teammates.ui.pagedata.CreateImageUploadUrlAjaxPageData in project teammates by TEAMMATES.

the class CreateImageUploadUrlAction method getCreateImageUploadUrlPageData.

protected final CreateImageUploadUrlAjaxPageData getCreateImageUploadUrlPageData() {
    CreateImageUploadUrlAjaxPageData data = new CreateImageUploadUrlAjaxPageData(account, sessionToken);
    try {
        data.nextUploadUrl = getUploadUrl();
        data.ajaxStatus = "Image upload url created, proceed to uploading";
    } catch (BlobstoreFailureException | IllegalArgumentException e) {
        data.nextUploadUrl = null;
        isError = true;
        data.ajaxStatus = "An error occurred when creating upload URL, please try again";
    }
    return data;
}
Also used : BlobstoreFailureException(com.google.appengine.api.blobstore.BlobstoreFailureException) CreateImageUploadUrlAjaxPageData(teammates.ui.pagedata.CreateImageUploadUrlAjaxPageData)

Aggregations

BlobstoreFailureException (com.google.appengine.api.blobstore.BlobstoreFailureException)1 CreateImageUploadUrlAjaxPageData (teammates.ui.pagedata.CreateImageUploadUrlAjaxPageData)1