Package com.aetrion.flickr.uploader

Examples of com.aetrion.flickr.uploader.Uploader


        AuthInterface authInterface = flickr.getAuthInterface();
        Auth auth = authInterface.checkToken("72157625348978315-7c9ef5a03dc17410");
        RequestContext context = RequestContext.getRequestContext();
        context.setAuth(auth);

        Uploader up = new Uploader(key, shared);
        File file = new File("test.png");
        UploadMetaData meta = new UploadMetaData();
        meta.setAsync(false);
        meta.setContentType(Flickr.CONTENTTYPE_SCREENSHOT);
        meta.setDescription("my screenshot description");
        meta.setHidden(false);
        meta.setPublicFlag(true);
        meta.setSafetyLevel(Flickr.SAFETYLEVEL_SAFE);

        List<String> tags = new ArrayList<String>();
        tags.add("leosketch");
        tags.add("webos");
        meta.setTags(tags);
        meta.setTitle("webos screenshot");
        u.p("starting to upload");
        up.upload(new FileInputStream(file),meta);
        u.p("done uploading");
        /*
</rsp>
Authentication success
Token: 72157625348978315-7c9ef5a03dc17410
View Full Code Here


                    AuthInterface authInterface = flickr.getAuthInterface();
                    Auth auth = authInterface.checkToken(context.getSettings().getProperty(FLICKR_USER_TOKEN));
                    RequestContext context = RequestContext.getRequestContext();
                    context.setAuth(auth);

                    Uploader up = new Uploader(key, shared);
                    UploadMetaData meta = new UploadMetaData();
                    meta.setAsync(false);
                    //meta.setContentType(Flickr.CONTENTTYPE_SCREENSHOT);
                    //meta.setDescription("my screenshot description");
                    meta.setHidden(false);
                    meta.setPublicFlag(true);
                    meta.setSafetyLevel(Flickr.SAFETYLEVEL_SAFE);

                    List<String> tags = new ArrayList<String>();
                    tags.add("leosketch");
                    meta.setTags(tags);
                    meta.setTitle(message);
                    u.p("starting to upload");
                    final String str = up.upload(new FileInputStream(file),meta);
                    u.p("done uploading: " + str);

                    Core.getShared().defer(new Runnable(){
                        public void run() {
                            FlickrUploadAction.this.context.addNotification("Done uploading to Flickr");
View Full Code Here

        return uploadInterface;
    }

    public Uploader getUploader() {
        if (uploader == null) {
            uploader = new Uploader(apiKey, sharedSecret);
        }
        return uploader;
    }
View Full Code Here

TOP

Related Classes of com.aetrion.flickr.uploader.Uploader

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.