« first day (1460 days earlier)      last day (1558 days later) » 

3:27 AM
hello everyone..
I've used this link ( stackoverflow.com/questions/28290458/xcode-download-mp3-file ) for storing a file in the device. For testing purpose i'm using emulator. I'm using wkwebview webview. Inside that i have a <a href="someURL">Click to download MP3 File</a>. After this click the things work as expected. The file mp3 file gets copied in the documents folder of my PC. But here i have two questions.
1. After the file gets copied the same audio file is opened in the webview, is there any way to stop the files being loaded in the wkwebview webview?
2. When i use the code written in the link mentioned above, it gets copied to documents folder in PC, would this same code copy the files to documents folder in the actual iPhone?
 
 
1 hour later…
4:48 AM
Good Morning All
 
5:23 AM
Good morning.
 
 
3 hours later…
8:11 AM
1. using webview delegate method, we can check the url, if it contains particular keyword then we can stop it by simply doing return.
2. I think it will not store because it is mp3 file. If it is image then it will store on the gallery.
@JennisVaishnav
 
 
2 hours later…
10:06 AM
@BoominadhaPrakashM Thanks for the reply. Looking for particular keyword would makes sense. But what if i have dynamic file names. Actually i have a functionality in my project where user can download the file. So is there any way to store the files in the device it self?
In short, the download task is not only limited to mp3 download, there are files which includes documents (PDF,CSV,PPT,XLXS),images, audio files, video files. Or any other document which user uploads.
Currently what happens is the file (Let it be any file CSV,jpeg or mkv) the file directly opens in webview. I'm unable to store the file in the device. So for starting I've selected mp3 to save in particular folder. And as per the link(stackoverflow.com/questions/28290458/xcode-download-mp3-file) the file also get's copied in documents folder of PC when i use emulator.
 
11:00 AM
It's not possible to store file on iPhone device
except images
Apple will not allow to store the files directly on iPhone
you have to store in app data like how whatsapp are doing
Even if you download any files like video or pdf files, you can't see that on device. But inside the app data they will handle it
@JennisVaishnav
 
11:31 AM
@BoominadhaPrakashM thanks for quick reply. Then as a alternative can we have share button of that file which is opened in webview? I mean the native share functionality with the use of file URL?
 
11:43 AM
yeah
 
11:58 AM
@BoominadhaPrakashM can you help with the link of a blog or something, which could help me share that file?
 

« first day (1460 days earlier)      last day (1558 days later) »