Make Buffering on Epub Page Using FolioReaderKit - swift

I have collection view. Users can download and display it, i'm using FolioReaderKit to view the epub files and using alamofire download to download epub files.
is that possible if i make buffering page? So the download hasn't completed but user can still view the page that already downloaded while the progress download still running and download the next page?

Today FolioReaderKit do not support file stream, the actual architecture needs the full .epub (zip) file to unzip, parse and present the book.
Although, we have future plans for file stream, today it is not possible unless you clone and implement it.
If you download the files unzipped you also can make a custom FREpubParser.swift that reload and parse the files as you download it.

Related

Access downloaded pdf file path in HTML5 file system and display it in webview

In my chrome app, I am using HTML5 file system to save the pdf files to sand box.Downloading is working fine.But how do i access that downloaded file path? I want to give that path as webview source.
The best way, if it works, would be to use a filesystem URL. To get this use FileEntry.toURL
These don't work on external files (i.e. files that come from chrome.fileSystem.chooseEntry and are outside the app's sandbox) but should work for files in the app's sandbox.
Note, I am referring to filesystem:// urls not file://urls, which won't work as Marc Rochkind has pointed out in his answer.
Disclaimer: I haven't tested this, but I believe it should work.
You need to get the contents of the PDF into a data URL. See my answer to this question:
Download external pdf files to chrome packaged app's file system

Is it possible to download a file that uploaded via filepicker in chucks?

Is it possible to download a file that I uploaded via filepicker, in chucks? I work on a platform that doesn't allow me to download files overs a certain size programmatically, (httprequest) so I have a need to retrieve the file in chucks and reassemble them.
No we don't currently provide this functionality.

iOS - Allow user to download file from documents directory but not to upload file using iTunes

Here is a situation I have a data file in document directory which is being updated in the application every now and then. So I want to save it to my desktop using iTunes. But I don't want that the file should be uploaded back to my application. i.e. I want that user can download the file but can not upload any.
I was thinking to have the data file on some other location like Library and put a button on application settings saying "Prepare backup" that will copy that data file in Document directory, from where user can download it. If user uploads any thing it won't make any difference as my current file is in Library directory.
This is just a thought,
can anyone suggest me other way or the above way is good to go?
Edit: I just need that after the successful export user can view the data file (may be later) without support of the application.
You can't.
But what you can do is check (using an timer every 10 seconds) if a new file is added to the documents directory and then delete it programmatically.
But this ofcourse doesn't disable the replacement of files.

Tag MP3 downloaded From Internet?

I am building an app with several podcasts. Each podcast gives the option to download the MP3 to the app. I have about 6 podcasts and would like to Tag each, so that when the archive view is clicked from each podcast, only archived files from that particular podcast show.
Is there someway that I can add a Tag or something to the downloaded mp3, and then in the archive, search only for mp3s with a tag related to that podcast?
BTW, I am using NSURLConnection to download each file
I think you may be looking at this in the wrong way.
Rather than tagging your downloaded files, you could set up a data structure to hold information about your files and use that to display your information.
For example. If I were doing this I would have a Core Data model that held information about the downloaded file, and tags, or sources, and I would store the path to that file in the database. That way, you can store whatever information you like about the downloaded file, and you can access it through it's path.

Reading pdf file in ipad application

In my Ipad application i need to read .pdf files. these pdf files are stored in my server. the size of the pdf files are nearly 20Mb. Normaly in ipad we can view the pdf using UIwebview, but it's not useful in this case. the reason is normaly in iPad the pdf files are downloaded and showed in UIWebview.. but in my case the size maters..so i need another solution to read pdf files.
my suggestion is take the pdf in a spitted fashion.means suppose ur pdf contains 1000 pages download first page and load on the webView and start download for the remaining pages in the background something like nsoperationquee .so you need to modify in the server side also if you like my suggestion.
You have pdf url that in server right? get the pdf files from the server and store it locally like DB. After that you can display the PDF files from the DB. This is the one time process.Then it not take much time for download.
Or you get the pdf images and display in the uiimageview its simple and easy. But one drawback is you can read the text but not do any action on that i.e., copy the text like that
Thanking you