I have an app what do querys from my sql database and i need to download or open files from the database. The files route are saved in the database so i need a way to download it or open in the app.The files type are pdf and jpg.
Related
is there any way to hide files like images and audio files and especially sqlite database from user?so no can see it and access it.right now i am using document directory with .userdomainMask to store data.or can we encrypt the sqlite database?
You can hide files with adding .(dot) before filename.
So, you have to rename you file like:
mydata.sqlite
to
.mydata.sqlite
I'm using NSURLSessionDownloadTask to download some .mov files from a web and storing them in my app.
Now what I'd like to achieve is to
download ALL files of certain type (in this case .mov) available on the page, without having to specify every file URL
download files ONLY if they are not already stored in my app.
Is there any way to achieve this?
You would have to scrape that html page to get all the urls (.mov) you are looking for. Either you can use NSXMLParser if you want to write your own or you can google some library.
When you download a file, persist some metadata (eg. name or some unique identifier) either in SQLite or CoreData, so that you can check if the file has already been downloaded.
I am working an MVC for project and MSSQL database backend. The project can be view outside even in mobile browser,
This is the workflow, The project have two users the "Admin" and the "User", admin will upload a pdf file and user can view the pdf file that admin upload. Is it possible that when the user is offline or doesn't have the access to the net he can still view the page and can download or view the pdf file.
For showing those PDF file locally when User is offline, You can do one simlest thing is that
1) Store the Files opened today(or in few days) in 'App_Data' folder.
2) Write some process in your server side to check whether the PDF file is present in App_Data or not.
If(File present in App_Data Folder)
{
//We Can Open that PDF File Locally
}
else
{
//Stream those PDF Files and store it in App_Data for further use.
}
I have implemented an app in iphone using sqlite DB
I have 200 + PDF file to be used in application
I thought its better to store those files in sqlite and use them from here than copy them in to xcode project.
is my openion is correct or not.
If yes
then how should i insert these 200+ PDF files to sqlite DB from my system.
I'm using swfupload to upload some excel files to my server. When the uploaded file is in the old (< 2003) format, everything works fine. I can upload the file, redownload it, and and confirm it is the same.
The problem is, whenever I upload a file in the new open xml format (> 2007). When I redownload that file and open it, I get an error:
Excel found unreadable content in 'filename'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
I checked on the server and confirmed the same error is present there as well.
Additional info:
The files are stored on the server file system (not DB BLOBs)
If I "recover" the file, the contents appear to be exactly the same as the originals
This same system works fine for Excel < 2003 files and image files
I save the file on the server with File.WriteAllBytes(filePath, data) where data is generated by upload.InputStream.Read(data, 0, upload.ContentLength)