Package slim3.demo.controller.blobstore

Source Code of slim3.demo.controller.blobstore.ShowController

package slim3.demo.controller.blobstore;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import com.google.appengine.api.blobstore.BlobKey;
import com.google.appengine.api.blobstore.BlobstoreService;
import com.google.appengine.api.blobstore.BlobstoreServiceFactory;

public class ShowController extends Controller {

    @Override
    public Navigation run() throws Exception {
        String keyName = asString("keyName");
        BlobKey blobKey = new BlobKey(keyName);
        BlobstoreService bs = BlobstoreServiceFactory.getBlobstoreService();
        bs.serve(blobKey, response);
        return null;
    }
}
TOP

Related Classes of slim3.demo.controller.blobstore.ShowController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.