There is a 1MB limit for entities in the datastore so if your data fits
within that limit than the datastore is a good option. My app stores all its
data in the datastore including videos, audio files, images, pdf's, etc. I
started it before the blobstore existed. So, if your data is greater than
the 1MB limit you'll need to break it up in to pieces which isn't as
difficult as it seems but depends on your comfort level. What I'd do is add
to the end of your key (which should be a string) a file segment number so
it would be something like "key:01","key:02". The reason you should pad it
with zeros is so that all of your file entries will be ordered by segment.
If you do "key:1","key:2",..... and then you have "key:11", they will be
ordered "key:1","key:11","key:2", which may not bother you but when looking
in the DatastoreViewer, etc. it's nice to see them in order by segment
number. Then when it's time to retrieve the file, you do a range query like
key >= "key:" && key <= "key:~" this will get you the file segments. I use
the ~ (tilde) character as my upper limit character when doing these type of
operations but other characters can be used depending on your data set. My
approach is slightly more involved than this do to the large file sizes I
support and other criteria, but this approach should work for your case.

Okay, from the client perspective, VB.NET shouldn't be a problem, my upload
tool is written in C#. The easiest approach is to read in the text file and
put it's content as the POST data, you can add other parameters to the query
string part of the url if additional information is needed or format the
post to include the file and data together. I myself put the contents of the
file into XML format which i put as the POST data, so I can include all my
data including additional information about the file into the XML. Since
your file is text either approach should work fine. For binary data, you'd
need to base64 encode the data or something like that (which is what I do).

Okay, from the user perspective of uploading the file from a browser to your
app, you'll need to parse the file out of the multi-part format. Here is an
article on how to use an Apache/Jakarta library to do just that:
http://www.developershome.com/wap/wapUpload/wap_upload.asp?page=jsp  This
seems to be a pretty good write up on how to use it. I haven't used it since
there wasn't a nice article about it when I started using GAE and since the
whitelist doesn't allow some things to work, so I'm not sure if this works
or not. So basically I wrote my own parser to extract web browser based
uploads. I think this should work as long as you set the Size Threshold high
enough otherwise the document says it will try to write to disk. Maybe
someone else on this board has used this utility and can say whether or not
it works.

Well, I'm sure this is more info than you needed, but maybe it might help
someone else someday that is trying to figure this same stuff out.
Cheers,
Stephen
CortexConnect
cortexconnect.appspot.com


On Thu, Jul 28, 2011 at 6:55 AM, GeorgeS <[email protected]> wrote:

> Thanks for that link... I took a look but I don't think that model really
> applies to my case here. I'm wondering if just uploading the files and
> pushing them into the Datastore as a piece of text with the key being the
> user id and file type may be simpler?
>
> Anyone have any thoughts on the question about upload from VB.Net? Is this
> possible?
>
> TIA!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/Ib_tCtVAuLkJ.
>
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to