Display the size in Ko of all rows individually, from a table using SQLite db?


#1

Hi there,

I tried to find a tutorial of how to create the same app as “Ionic View” : http://view.ionic.io/
Because in this app you have the size of each project for example.

Any ideas ?

See the picture (red lines)


#2

Ionic View gets this from the API it is using.


#3

Well, you should not save raw pictures in the database. Save the pictures on the filesystem, and put the url of the picture in your database, then you acces the picture by acessing the url from the DB.

In this situation you can use the file system plugin to get the size of the file and display it in your app, if I am not mistaken.


#4

Which API is it using ?

But is there a way to take this data and use it on the view of my app ?


#5

The API Ionic uses to offer the data from apps.ionic.io to their own Ionic View app.

This has nothing to do with a “picture from SQLite db” and so is not helpful in any way to your question.


#6

Alright so for another example, if I want to create a memo app. I want to see the size of each memo when I’m on the menu. In the memos you have text and one or more pictures.
Does it make more cense ?

Sorry if it was confused. So is there a way to display the size ?
By using a database from the SQLite plugin.

Thanks for your time and quick reply.


#7

What I would do is add a size field to the memo table, and write to it when updating the memo.


#8

How would you get the size of it ? there is 4 fileds on the table PAGES (title VARCHAR (50), content TEXT, location VARCHAR (100), isCrypted BOOLEAN) and a second table called PICTURES with picturePath and the FK of the first table.

Is it possible to get the weight of each field ?

@rapropos