Examples of 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

Examples of com.aetrion.flickr.uploader.Uploader

                    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

Examples of com.aetrion.flickr.uploader.Uploader

        return uploadInterface;
    }

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

Examples of com.baidu.ueditor.upload.Uploader

      case ActionMap.UPLOAD_IMAGE:
      case ActionMap.UPLOAD_SCRAWL:
      case ActionMap.UPLOAD_VIDEO:
      case ActionMap.UPLOAD_FILE:
        conf = this.configManager.getConfig( actionCode );
        state = new Uploader( request, conf ).doExec();
        break;
       
      case ActionMap.CATCH_IMAGE:
        conf = configManager.getConfig( actionCode );
        String[] list = this.request.getParameterValues( (String)conf.get( "fieldName" ) );
View Full Code Here

Examples of com.jelastic.model.UpLoader

            getLog().info("------------------------------------------------------------------------");
            getLog().info("   Authentication : SUCCESS");
            getLog().info("          Session : " + authentication.getSession());
            //getLog().info("              Uid : " + authentication.getUid());
            getLog().info("------------------------------------------------------------------------");
            UpLoader upLoader = upload(authentication);
            if (upLoader.getResult() == 0) {
                getLog().info("      File UpLoad : SUCCESS");
                getLog().info("         File URL : " + upLoader.getFile());
                getLog().info("        File size : " + upLoader.getSize());
                getLog().info("------------------------------------------------------------------------");
                CreateObject createObject = createObject(upLoader,authentication);
                if (createObject.getResult() == 0) {
                    getLog().info("File registration : SUCCESS");
                    getLog().info("  Registration ID : " + createObject.getResponse().getObject().getId());
                    getLog().info("     Developer ID : " + createObject.getResponse().getObject().getDeveloper());
                    getLog().info("------------------------------------------------------------------------");
                    if (System.getProperty("jelastic-session") == null) {
                        LogOut logOut = logOut(authentication);
                        if (logOut.getResult() == 0){
                            getLog().info("           LogOut : SUCCESS");
                        } else {
                            getLog().info("LogOut : FAILED");
                            getLog().error("Error : " + logOut.getError());
                            throw new MojoExecutionException(logOut.getError());
                        }
                    }
                }
            } else {
                getLog().error("File upload : FAILED");
                getLog().error("      Error : " + upLoader.getError());
                throw new MojoExecutionException(upLoader.getError());
            }
        } else {
            getLog().error("Authentication : FAILED");
            getLog().error("         Error : " + authentication.getError());
            throw new MojoExecutionException(authentication.getError());
View Full Code Here

Examples of com.jelastic.model.UpLoader

    @Test
    public void upLoaderOkTest() throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        URL url = this.getClass().getClassLoader().getResource("uploader_ok.json");
        UpLoader upLoader = mapper.readValue(url, UpLoader.class);
        assertEquals(upLoader.getName(), "jelastic-maven-plugin-1.0-SNAPSHOT.jar");
    }
View Full Code Here

Examples of com.jelastic.model.UpLoader

    @Test
    public void upLoaderErrorTest() throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        URL url = this.getClass().getClassLoader().getResource("uploader_error.json");
        UpLoader upLoader = mapper.readValue(url, UpLoader.class);
        assertEquals(upLoader.getError(), "invalid param");
    }
View Full Code Here

Examples of com.pinterest.secor.uploader.Uploader

        mMessageReader = new MessageReader(mConfig, mOffsetTracker);
        FileRegistry fileRegistry = new FileRegistry(mConfig);
        mMessageWriter = new MessageWriter(mConfig, mOffsetTracker, fileRegistry);
        mMessageParser = (MessageParser) ReflectionUtil.createMessageParser(
                mConfig.getMessageParserClass(), mConfig);
        mUploader = new Uploader(mConfig, mOffsetTracker, fileRegistry);
        mUnparsableMessages = 0.;
    }
View Full Code Here

Examples of gwtupload.client.Uploader

        super(status, fileInput);
    }

    @Override
    protected IUploader getUploaderInstance() {
        Uploader uploader = (Uploader) super.getUploaderInstance();
        uploader.setAutoSubmit(automaticUpload);
        return uploader;
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.mapreduce.SampleUploader.Uploader

  @SuppressWarnings("unchecked")
  @Test
  public void testSampleUploader() throws Exception {

    Configuration configuration = new Configuration();
    Uploader uploader = new Uploader();
    Mapper<LongWritable, Text, ImmutableBytesWritable, Put>.Context ctx = mock(Context.class);
    doAnswer(new Answer<Void>() {

      @Override
      public Void answer(InvocationOnMock invocation) throws Throwable {
        ImmutableBytesWritable writer = (ImmutableBytesWritable) invocation.getArguments()[0];
        Put put = (Put) invocation.getArguments()[1];
        assertEquals("row", Bytes.toString(writer.get()));
        assertEquals("row", Bytes.toString(put.getRow()));
        return null;
      }
    }).when(ctx).write(any(ImmutableBytesWritable.class), any(Put.class));

    uploader.map(null, new Text("row,family,qualifier,value"), ctx);

    Path dir = util.getDataTestDirOnTestFS("testSampleUploader");

    String[] args = { dir.toString(), "simpleTable" };
    Job job = SampleUploader.configureJob(configuration, args);
View Full Code Here
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.