iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
mrhhsg
V2EX  ›  iDev

iPhone 图库图片上传,如何读取图片?

  •  
  •   mrhhsg · Dec 18, 2015 · 3025 views
    This topic created in 3815 days ago, the information mentioned may be changed or developed.
    想做一个 app ,把图库的照片上传到某网盘,为了实现在后台上传用 NSURLSession 相关 API ,但是有个问题, NSURLSession 的后台模式只支持上传时指定文件的 URL ,而不能上传 NSData 数据,那么如何获取图片的 UR L 呢?目前采用的方法是通过 api 获取 NSData ,然后将 NSData 写到文件中,再上传文件,这样会浪费内存的读写次数吧。。。有没有比较好的方式?

    PS :用的 Photos Framework API
    3 replies    2016-03-01 15:51:42 +08:00
    gmykissqiqi
        1
    gmykissqiqi  
       Dec 22, 2015   ❤️ 1
    直接用七牛吧, iOS 端有个七牛的 SDK 直接传 NSData
    mrhhsg
        2
    mrhhsg  
    OP
       Dec 22, 2015
    @gmykissqiqi
    七牛貌似用的是 NSURLSession 的默认配置,不支持后台传输
    gmykissqiqi
        3
    gmykissqiqi  
       Mar 1, 2016
    @mrhhsg 对后台传输确实没什么研究。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2813 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 04:32 · PVG 12:32 · LAX 21:32 · JFK 00:32
    ♥ Do have faith in what you're doing.