I have android application, which needs to store somewhere object which contains user uploaded image + description of image. May be later additional data will be added.
Which service is better to use to store such information? Is it efficient to store such objects in Amazon SimpleDB or it is better to store images in storage and save link to picture in DB?
You should store the images in Amazon S3 and then store a link to these images in your database.
Related
I got a web application with a Java backend and React frontend. It allows users to upload and display pictures like in an album setting.
The application fetches data from a MS SQL server containing data about an image and then displays it in react.
The database contains a table with information about the image (filename, extension etc.) but not a BLOB.
I am currently displaying the image in react by creating an url from my local machine.
My question is now, what file system alternatives is there when i want to stop storing the images locally on my windows machine. Is it possible to use Google Drive API or something similar? What about SFTP? Would appreciate free solutions to begin with.
You can use Amazon S3 to store your images. store information about the image like file name, bucket name ,... etc in your database and store the image itself in Amazon S3.
There are also other alternatives to Amazon S3 if you want, like MinIO, which is open source and S3 compatible.
I want to store the images and display the same on the screen using struts. Is it better to store the images in database or on the file system? I have more than 10,000 images.
Storing images in the database as objects like blob or clob is generally not recommended as this will make the database size huge. You may get poor results while processing your resultsets. The better way to do this is have the images get stored in your file system and simply use its references in the databases which is efficient. Using a hash check on the uploaded images will also help in verifying the integrity of the images if they are uploaded to the server from the clients.
File system. It turns out it's quite good at storing files.
I want to
set a name to every blob(image or video) using blob store in GAE and
retrieve it later.
How can this be done in java (is given in Python). So can anyone tell me how can I do this. How can I use the name to retrieve the blob again?
I want to send and retrieve these images from an android device to the google cloud.
I have posted a similar question before as well but did not got a handy answer.
You have to use a blobkey to get a blob. If you want to use another name (like the filename) you have to store this name and the blobkey to get the blob. Only the blobkey is unique. For instance if you upload the same filename multiple times, these uploaded blobs will have unique blobkeys, but they do not have unique filenames.
See also : Google AppEngine Blobstore: Downloading a Blob by Filename in Java
I am trying to save some documents/Images and files in sqlite database. The documents contain different types of pdf,.doc etc files and different format images. Now once I stored it in the blob format, I want to do a backup of the database to sdCard. I however want this backup to be readable only by app for securing the data inside.
Now the question is , for storing different types of files, Do I have to use some sort of other database and for securing. what should I do?
Best Regards
Android's built-in SQLite does not support encryption.
Try instead a library like SQLCipher.
One solution is to use blob and to store the raw data of the file as a column in the db as you are currently doing.
Other solution which I think is better to store the files on the Internal Storage and just store the file paths in the database. Internal storage is private for your application so no one will have access to the files, so your security concerns are taken care of.
see here for how to do this:
Creating folder in internal Memory to save files and retrieve them later
But be aware that can using too much internal storage can make people's phones run out of internal storage and they might decide to delete your app.
I am in the planning stage of making a database application for android phones. One of my requirements is that I be able able to provide offline access for users. I am wondering what would be the most efficient way of storing a large amount of images (around four hundred-several thousand).
Oh, the images have been pre-compressed/optimized for mobile viewing. The 50mb limit on apk for the market won't be a issue.
You have to develop simple logic.Suppose you have connection then download all images.Now you have two way to access these images while you do not have connection-----
Store all images in data base as blob(But it not feasible to store huge amount
of data to database)
Second..
Store all images in sdcard(by making a folder in it) and now store link of these
images in data base Table.Suppose you donot have connection then first fetch
image path from DB Table then fetch file from sdcard and display
I would suggest storing the image files in sdcard and filename/path in sqlite DB. Store files in /Android/data/your.package.name/cache/ directory. When the user deletes the application, the cache folder will be deleted and also all the stored images.
Application build file(apk) size will be less as tofeeqahmad was suggesting.