Package play.modules.morphia

Examples of play.modules.morphia.Blob


    private Blob newBlob() {
        return newBlob("test/googlelogo.png");
    }
   
    private Blob newBlob(String path) {
        return new Blob(new File(path), "image/png");
    }
View Full Code Here


        assertFalse(u.isNew());
        assertEquals("alex", u.name);

        assertNotNull(u.photo);
        Blob b = u.photo;
        assertThatPhotoBlobIsValid(b.getGridFSFile());

        // Now load the user from zero
        u = User.find("byName", "alex").first();
        assertFalse(u.isNew());
        assertThatPhotoBlobIsValid(u.photo.getGridFSFile());
View Full Code Here


public class Bug44 extends UnitTest {
   
    private Blob newBlob(String path) {
        return new Blob(new File(path), "image/png");
    }
View Full Code Here

    public static void uploadImage(File image) {
        notFoundIfNull(image);
        User u = new User();
        u.name = RandomStringUtils.randomAlphabetic(5);
        u.photo = new Blob(image, "image/jpeg");
        u = u.save();

        renderText(u.getId());
    }
View Full Code Here

TOP

Related Classes of play.modules.morphia.Blob

Copyright © 2018 www.massapicom. 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.