GithubHelp home page GithubHelp logo

lerist / ipicuploader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toolinbox/ipicuploader

0.0 3.0 0.0 649 KB

Use iPic to upload images on macOS.

License: MIT License

Ruby 4.65% Objective-C 2.65% Shell 21.95% Swift 70.75%

ipicuploader's Introduction

iPic

iPic could automatically upload images and save Markdown links on macOS.

  • Upload images by drag & drop.
  • Upload images by services with shortcut [Command + U].
  • Upload copied images with shortcut [Shift + Command + U].
  • Support Imgur, Flickr, Amazon S3 and other image hosts.
  • Support image link of Markdown format.
  • Video introduction

Download iPic and have a try.

iPicUploader

iPic open the ability to upload images. It means if you App also needs to upload images, no need to build from scratch. Just use iPicUploader, you App could also upload images to Imgur, Flickr, Amazon S3 and other image hosts.

iPicUploader Usage

Upload image file:

let imageFilePath = "/Path/to/the/pic.jpg"

iPic.uploadImage(imageFilePath, handler: { (imageLink, error) in    
	if let imageLink = imageLink {
		// Image uploaded        
	   
	} else if let error = error {
		// Some error happened
	}
})

Upload image data:

let imageFilePath = "/Path/to/the/pic.jpg"
let imageData = NSData(contentsOfFile: imageFilePath)!

iPic.uploadImage(imageData, handler: { (imageLink, error) in    
	if let imageLink = imageLink {
		// Image uploaded        
	   
	} else if let error = error {
		// Some error happened
	}
})

Upload NSImage:

let imageFilePath = "/Path/to/the/pic.jpg"
let image = NSImage(contentsOfFile: imageFilePath)

iPic.uploadImage(image, handler: { (imageLink, error) in    
	if let imageLink = imageLink {
		// Image uploaded        
	   
	} else if let error = error {
		// Some error happened
	}
})

iPicUploader Example

iPicUploader also includes a full example. You will feel easy to start. To run the example project, just clone current repository and open iPicUploader.xcworkspace.

Note:

  • As the demo needs to upload images by iPic, you need to download iPic at first.
  • No worry, you will also be guided to download iPic in the example.
  • The example already dealt with these cases:
    • If iPic wasn't installed, guide user to download.
    • If iPic wasn't running, launch iPic automatically.
    • If iPic is running but not compatible, guide user to download latest version.

Now, let's have a look how the example upload images.

1. Upload Images by Drag & Drop

As you can see, iPicUploader support uploads multi-images at a time.

2. Upload Images by Select Images Files

3. Upload Images by Copy Image and Paste

Beside copy image files, you can also copy the image in other Apps to upload.

Requirements

As iPic runs on macOS 10.11 and newer version, iPicUploader also needs macOS 10.11+

Installation

iPicUploader is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "iPicUploader"

License

iPicUploader is available under the MIT license.

ipicuploader's People

Contributors

atjason avatar

Watchers

James Cloos avatar Lerist avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.