• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

toolinbox/iPicUploader: Use iPic to upload images on macOS.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

toolinbox/iPicUploader

开源软件地址(OpenSource Url):

https://github.com/toolinbox/iPicUploader

开源编程语言(OpenSource Language):

Swift 92.7%

开源软件介绍(OpenSource 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 opens the ability to upload images. It means if your App also needs to upload images, no need to build from scratch. Just use iPicUploader, your 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 imageURL = URL(fileURLWithPath: imageFilePath)
let imageData = try! Data(contentsOf: imageURL)

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 supports upload of multiple 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.

Apps Using iPicUploader

It would be great to show your apps using iPicUploader here. Pull requests welcome :)

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap