5 messages in com.googlegroups.google-gearsRe: [google-gears] Re: FileSystem API| From | Sent On | Attachments |
|---|---|---|
| Ben Lisbakken | 07 Mar 2008 10:24 | |
| Ben Lisbakken | 10 Mar 2008 14:48 | |
| Ben Lisbakken | 11 Mar 2008 08:56 | |
| Ben Lisbakken | 11 Mar 2008 08:57 | |
| Ben Lisbakken | 13 Mar 2008 16:23 |
| Subject: | Re: [google-gears] Re: FileSystem API![]() |
|---|---|
| From: | Ben Lisbakken (lisb...@google.com) |
| Date: | 03/13/2008 04:23:31 PM |
| List: | com.googlegroups.google-gears |
Hafiz --
Sorry for not getting back to you yesterday. I was thinking about a solution and couldn't come up with a good one, so I decided to sleep on it :)
Anyways, there is no way for Gears to write to the filesystem (outside of the Gears cache). And there is no way to write to the filesystem with JavaScript (no cross-browser, semi-elegant way, AFAIK). So yes, I would say the best option would be to print out the new contents of their modified CSV to them, and ask them to copy/paste it into a file.
What do you mean by 'clipboard'?
-Ben
On Thu, Mar 13, 2008 at 1:54 AM, glidealong <hafi...@gmail.com> wrote:
No probs , I think it's time to think about something like clipboard and ask the user to copy paste it to some excel file to create the csv file
Any idea on clipboard with Googlegears? though i think i have actionscript 3 to fall back to ..
Anyway your inputs were valuable and thanks a ton.
Thanks and Regards, Hafiz
On Mar 12, 10:00 am, glidealong <hafi...@gmail.com> wrote:
Hi Ben, Thank you for the suggestions. But my scenario is a little different. Actually I have 2 typed of data in my hand. One from the server and another from the client. Now I want to process the data in client itself, rather than sending across the network, and derive a new data set. Now I want to save the file on to the local hard drive. So I was just wondering if it was possible for the google gears to save a data derived at the client side, on to the file system with the name and location desired by the user???.
Anyway, now i am starting to think google gears is the way to go(we were actually considering AIR very seriously until recently) for a major part of our development, though we see scope for AIR in certain other scenarios.
Thanks a ton, Hafiz
On Mar 11, 8:58 pm, "Ben Lisbakken" <lisb...@google.com> wrote:
Oh, I forgot I wanted to add this link in my post: http://code.google.com/support/bin/answer.py?answer=82853&topic=11630 It's the location of the Gears cache - in case you were wondering where the magic happens :)
-Ben
On Tue, Mar 11, 2008 at 8:57 AM, Ben Lisbakken <lisb...@google.com>
wrote:
Hafiz --
Where do you want the file downloaded to? Gears can only download a file to the Gears cache. You could use the resource store to store the file in the Gears cache, then you can change the name of it to be what the user wants... then the user can access the file through the browser.
What are you trying to do? In your case it doesn't make sense to just provide a link to the file? If you are dynamically generating a file, say with PHP, you can set the content type. So, for example, if you're writing a new CSV for them you could use PHP to specify the content type and echo the contents of the CSV, then the user could just hit Save on the webpage and specify the filename they want to save it as, as well as the destination.
-Ben
On Tue, Mar 11, 2008 at 4:55 AM, glidealong <hafi...@gmail.com>
wrote:
Hi Ben, It worked like magic. Now I might need to save a file on to the filesystem in the location and with the name specified by the user. Is it possible?
Anyways , your input was valuable and thanks for the same.
Best Regards, Hafiz
On Mar 11, 9:24 am, glidealong <hafi...@gmail.com> wrote:
Thanks Ben, I will sure try what you suggested right away and let you know at the earliest.
Thanks a ton, Hafiz
On Mar 11, 2:48 am, "Ben Lisbakken" <lisb...@google.com> wrote:
Hafiz --
What you can do is use resourceStore.captureFile(inputElement, urlToStoreAs);
Setup a file input on your page: <input type="file" id="fileInput" />
After the user inputs the location of their CSV file, they hit submit which should call:
resourceStore.captureFile(document.getElementById('fileInput'),
'file.csv');
The captureFile method in ResourceStore will copy the file
into the
Gears
cache.
If I had done this onwww.lisbakken.com, then I could then have
the
script
make an AJAX request to:http://www.lisbakken.com/file.csv and the file would be served from the Gears cache.
Hope that helps, Ben
On Mon, Mar 10, 2008 at 3:04 AM, glidealong <
hafi...@gmail.com>
wrote:
Hi Ben,
I will explain the scenario. In our application we deal with
2
types
of data - one from the database at the server and the other customer confidential data in csv format at the client side. We need
to
merge
the data from both and display it in one single chart/table.
This
data
has to be read from the client machine into the browser and provided to the flex application for further processing. If we were planning to do the application in AIR we could have simply read the filesystem using an FileStream object.
Is it possible to do something similar using google gears?. Another option may be to upload-download cycle using flex/java combination. That's not quite clean and involves communication with the
server.
It
can cause lots of problems like communication overhead and
issues
with
the client since we are sending it across the network,
eventhough
we
dont save it in the database.
So I am looking for a client side based file read..
something like
wrote:
Hafiz --
Can you tell me what exactly you are trying to do?
Thanks, Ben
On Thu, Mar 6, 2008 at 9:14 PM, glidealong <
hafi...@gmail.com>
wrote:
I need certain functionality like browse the local
filesystem
and
read/
write certain files into the location specified by the
user.
In Adobe
AIR you can use the FileSystem package to do that. I
found an
article
mentioning something similar in GoogleGears @ http://code.google.com/p/google-gears/wiki/FileSystemAPI.
But I
have
failed on all my attempts to make it work and nor i
could find
a
working example of something similar.
Can anyone provide a clue on this?
Thanks and Regards, Hafiz- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -




