PDA

View Full Version : Is there a limitation in number/size of files sent to the src.sencha.io/data servic?



boris.barcelli
22 Feb 2012, 11:49 AM
Hi,
I have a bunch of 40 images loaded from my DB in my ST2 app when I am online, trying to transform them into dataUrls in order to store them in my local storage. I am following this tuto for that: http://www.sencha.com/learn/taking-sencha-touch-apps-offline/

A (http://www.sencha.com/learn/taking-sencha-touch-apps-offline/)fter around 10 files or 1600Mo of data, the service return with a 404 Not Found on all my service requests. Because you are caching all the images previously encoded, my theory is that you have a limitation in the size of this cache ? But I am not sure, any help here ?
Any alternative solution would be great, I really need to store those images offline.
Regards

mitchellsimoens
22 Feb 2012, 1:57 PM
There does seem to be a bug somewhere but you may want to look into local encoding solutions rather than doing this over the internet as it would be quite a bit faster. In fact the blog post about src.sencha.io even mentions this.

boris.barcelli
22 Feb 2012, 2:09 PM
Thank you for the quick answer Mitchell.
Can you point me in the right direction for the blog post you talking about ? I have read many but didn't find anything really explicit on how to use a local solution. I reckon it may be :
- Using the canvas encoding function (hopefully will not run in any security issue), do you have any code example with ST2 (or 1 will do) on hopw to implement this solution ?
- Using the phonegap API
Which one would you go for ?
And, do you have any ETA n fixing on the sencha.io issue ?

mitchellsimoens
22 Feb 2012, 2:16 PM
http://www.sencha.com/learn/how-to-use-src-sencha-io/

I would encode the images before app deployment.

dddesign
1 Mar 2012, 3:29 PM
I also get a lot of 404 of my images. I can't see an error pattern and the images aren't this big.
see this webapp:
http://mobile.moontools.ch/testapp_list2/

merrells
1 Mar 2012, 4:04 PM
I just browsed your app and all the thumbnails and images were ok...

John

dddesign
1 Mar 2012, 11:04 PM
The thumbnails get loaded directly not through sencha.io but all the images afterwards (when you click an item of the list) through sencha.io and there I get some 404 if I test the web app on pc. But also on my mobile device. Can this happen if the response time is too long ( I situated in Switzerland )?
J

dddesign
11 Mar 2012, 10:34 AM
I have still this problem (see screenshot) on pc (testing) and on mobile device. 32612

any ideas? any recommendations?

dddesign
20 Mar 2012, 12:01 PM
I still have some problems here. When I read the docs again I saw chapter "domain sharding" and implemented this in my webapp like this:



newPhotoTab = Ext.create('Ext.Carousel');
for (i=1; i<=record.get('count'); i++) {
shard = i % 4 +1;
var photo = Ext.create('Ext.Img', {
src: 'http://src'+shard+'.sencha.io/http://moontools.ch/photo-moon-tool/images/'+ record.get('folder_name') +'/'+ record.get('img_name') + pad(i, 3) +'.jpg',
});
newPhotoTab.add(photo);
}


this is working in general, but I have still some 404 errors. what can I do?!