SDWebImage
SDWebImage copied to clipboard
Feature Request - Allows load arbitery URL data which is not an image
Thank you for providing such a great repo
I think you can open more api
For example:
I want to use SDWebImagePrefetcher
download some files, preload and cache
but in the SDWebImageDownloaderOperation
, the data must is ImageData
otherwise, it will be error
I want to use SDWebImagePrefetcher download some files, preload and cache but in the SDWebImageDownloaderOperation, the data must is ImageData
@huangboju You mean, you want to download something Not a Image, for example, download https://www.baidu.com/index.html
or https://github.com/SDWebImage/SDWebImage/archive/5.6.1.zip
into a raw data ?
If your downloaded file, can represent a Image in some aspect, for example, like SDWebImageLinkPlugin which query the website favicon icon, you can do this. But, for any other than image, we can not help...
Because this beyond SDWebImage's capabilities, we're WebImage, not a Network Framework 😅
Actually, I think using NSURLSession directlly is not hard as our API...
@dreampiggy I don't just want to download files, include cache management
If i rewrite a Prefetcher
, it will have a lot of duplicate code in my project
I think SDWebImage
can become more powerful and modular
After all, most programmers can't write such good downloader and cacher
Seems a feature request which will effect the API (Because now, the completion block does not contains Image
, maybe we can make it a protocol to callback anything).
Marked as 6.0.0 milestone.
You can join https://gitter.im/SDWebImage/community here to talk in Chiniese about your use case
For temp workaround, you can use Custom Download Operation, to override the URLSession:task:didCompleteWithError:
method.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.