On Monday, March 18, 2013 8:22:20 PM UTC+1, Jan Varga wrote:
> Hi,
> 
> getEditable() shouldn't be so hard to implement (not trivial though), but
> 
> there's a bigger problem ...
> 
> FileHandle API doesn't work in child processes yet
> 
> 
> 
> However, we're collecting information about storage needs in b2g. This
> 
> information will be used to prioritize WebAPI team goals for following
> 
> quarters. So multiprocess FileHandle could be one of them if there's a
> 
> compelling enough use case.
> 
> 
> 
> Jan
> 
> 
> 
> ----- Original Message -----
> 
> From: "Jan Jongboom" <[email protected]>
> 
> To: "mozilla dev b2g" <[email protected]>
> 
> Cc: "Jan Jongboom" <[email protected]>, [email protected]
> 
> Sent: Monday, March 18, 2013 5:43:11 PM
> 
> Subject: Re: DeviceStorageAPI getEditable not implemented?
> 
> 
> 
> On Monday, March 18, 2013 5:31:57 PM UTC+1, Doug Turner wrote:
> 
> > We never got around to implementing getEditable.
> 
> >
> 
> >
> 
> >
> 
> > Adding Jan who had some passing interesting in doing the work.  (btw,
> 
> >
> 
> > patch accepted).
> 
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> > On 3/18/13 9:12 AM, Jan Jongboom wrote:
> 
> >
> 
> > > When I'm calling getEditable on the DeviceStorageAPI I'm presented with
> 
> an object that has the following keys:
> 
> >
> 
> > >
> 
> >
> 
> > > slice, name, type, size, mozSlice, lastModifiedDate, mozFullPath. Oh
> 
> and instanceof File is true which kinda gives it away :-)
> 
> >
> 
> > >
> 
> >
> 
> > > This is a File object rather than a FileHandle, which it should be
> 
> according to the documentation (
> 
> https://wiki.mozilla.org/WebAPI/DeviceStorageAPI). Is this a bug or am I
> 
> missing something?
> 
> >
> 
> > >
> 
> >
> 
> > > Here's some code:
> 
> >
> 
> > >
> 
> >
> 
> > >       var req = this.storage.getEditable(filename);
> 
> >
> 
> > >       req.onsuccess = function(e) {
> 
> >
> 
> > >         var fileHandle = e.target.result;
> 
> >
> 
> > >         alert(fileHandle instanceof File); // true
> 
> >
> 
> > >         alert(fileHandle instanceof FileHandle); // false
> 
> >
> 
> > >       };
> 
> >
> 
> > >
> 
> 
> 
> Alright, that's disappointing. if this is getting picked up I'm happy to
> 
> help.

Hi Jan,

One of the things that we have (has ux wanted 1.x) is rotating images in the 
gallery. I wanted to do an actual replace of the file content to not mess up 
the metadata through getEditable(). At the moment there is no way to overwrite 
file contents (at least not to my knowledge) :-)
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to