0

DragAndDrop without ImageAlter?

Hi folks,

I was checking the Image Twiddler example, and i was wondering if it is possible to use ONLY the draganddrop service and then use the result to load an image into an <img> tag. As the example shows it is only possible with the imagealter service.

Adam

by
8 Replies
  • QUOTE (adam.maschek @ Nov 2 2008, 01:17 PM) <{POST_SNAPBACK}>
    Hi folks,

    I was checking the Image Twiddler example, and i was wondering if it is possible to use ONLY the draganddrop service and then use the result to load an image into an <img> tag. As the example shows it is only possible with the imagealter service.

    Adam


    Yes, as things stand today the only way you can display dropped files in a page is via the ImageAlter service. Obviously we could use a couple new services... In fact we used to have a distinct "ImagePreview" service which was smaller and would return images...

    So the larger question is, for the applications you have in mind, what content types, other than images, would you want to access? I'm dreaming of a generic FileAccess service that would perhaps allow access to byte ranges in page, or provide a local url to any file drop/selection.

    lloyd
    0
  • Well, for one, Keynote and PowerPoint decks. See:

    http://280slides.com/

    If you had FileAccess, you could drag an existing Keynote presentation into the project and have it import the slides locally. Any kind of media you'd want to import into a slide would be fair game as well (images, sounds, movies). Google Docs and similar apps would benefit by local JS import of Excel and Word files.

    On the Keynote file type, I should mention a particular problem that extends just between the niceties of drag and drop or in-page preview. Because iWork files are actually folder-style bundles, you can't upload them with the native browser facilities. Try it. Go to me.com (an Apple site) and try to upload an iWork file (Pages, Numbers, Keynote) to your iDisk from the web interface (or try attaching to an email). You can't do it. Bundles aren't allowed. An architect on the Mobile Me product mentioned at WWDC that this was a hurdle for them that is obviously not yet resolved on me.com.

    skylar
    0
  • QUOTE (Skylar Woodward @ Nov 6 2008, 11:19 PM) <{POST_SNAPBACK}>
    Well, for one, Keynote and PowerPoint decks. See:

    http://280slides.com/

    If you had FileAccess, you could drag an existing Keynote presentation into the project and have it import the slides locally. Any kind of media you'd want to import into a slide would be fair game as well (images, sounds, movies). Google Docs and similar apps would benefit by local JS import of Excel and Word files.

    On the Keynote file type, I should mention a particular problem that extends just between the niceties of drag and drop or in-page preview. Because iWork files are actually folder-style bundles, you can't upload them with the native browser facilities. Try it. Go to me.com (an Apple site) and try to upload an iWork file (Pages, Numbers, Keynote) to your iDisk from the web interface (or try attaching to an email). You can't do it. Bundles aren't allowed. An architect on the Mobile Me product mentioned at WWDC that this was a hurdle for them that is obviously not yet resolved on me.com.

    skylar


    awesome points skylar.

    So we were talking about FileAccess today with the folks at yahoo who make sure we keep things safe, and they were pretty supportive of the idea. So what's the feature set?
    1. get a URL from a file handle
    2. Get a byte range from a file handle

    #2 would let a user drop a text file on a textinput box and the javascript could populate the textbox with the contents... We may want to put size limitations on that to keep, uh, drops of iso images from making a mess...

    Bundle upload! Sounds like a Tar service could solve that. perhaps this thing should be capable of compression as well?

    fun.

    Only thing I'm not so sure about is parsing complex formats like excel... I've seen simple vcard parsing done in javascript, but a set of focused services may make the parsing of complex formats more tractable...

    fun.

    lloyd
    0
  • so here we actually have at least three distinct ideas that could be broken out into new topics in "feature ideas"...

    sorry for the double post, you guys got me excited.

    lloyd
    0
  • QUOTE (Lloyd Hilaiel @ Nov 7 2008, 12:43 AM) <{POST_SNAPBACK}>
    Only thing I'm not so sure about is parsing complex formats like excel... I've seen simple vcard parsing done in javascript, but a set of focused services may make the parsing of complex formats more tractable...


    I think this might be in reference to my project over the summer, µJuicer (http://www.vimeo.com/1288036).

    Now that B+ is released in the wild, I'm really excited to put this online. The only snag is that I don't know how to do client-side file-handling for vCards. Namely, I want to read in the content from DragAndDrop directly into JS and parse it through that.

    Originally for my demo, I wrote a one-line Ruby service that just did File.open(...).read, but that seems like a bad idea for something real. Any suggestions on the best way to do that now?
    0
  • QUOTE (mattt@ymail.com @ Nov 9 2008, 11:11 PM) <{POST_SNAPBACK}>
    I think this might be in reference to my project over the summer, µJuicer (http://www.vimeo.com/1288036).

    Now that B+ is released in the wild, I'm really excited to put this online. The only snag is that I don't know how to do client-side file-handling for vCards. Namely, I want to read in the content from DragAndDrop directly into JS and parse it through that.

    Originally for my demo, I wrote a one-line Ruby service that just did File.open(...).read, but that seems like a bad idea for something real. Any suggestions on the best way to do that now?


    Hey Mattt,

    welcome! I _was_ referring to your project when talking about vcards. In order to publish a working version online, it seems like the FileAccess corelet that we're talking about would be all you need. We're going to try to get this done in a matter of weeks, simply because it addresses several use cases. The functioning would be very similar to the ruby service you wrote, however it would also include the ability to get an ephemeral localhost URL so you can embed dropped images in pages without using imagealter, play desktop sourced video that the user has dropped, etc.

    Additionally, I think you'll be interested in the mime type filtering we added for 2.1.6. This would allow you to set up a drop target or file browse that only looks for the file types that you're interested in. Can you enumerate the file types (extensions and mime types) you care about and I'll make sure that they're supported by the platform?

    We'll twitter/blog/post here when the FileAccess service is available.

    Finally, we'll set up a new forum under BrowserPlus called "Hacks", a place where people can drop links and descriptions of works that they've done so everyone can check them out and get ideas. A poor mans gallery if you will :)lloyd
    0
  • QUOTE (Lloyd Hilaiel @ Nov 10 2008, 09:26 AM) <{POST_SNAPBACK}>
    In order to publish a working version online, it seems like the FileAccess corelet that we're talking about would be all you need. We're going to try to get this done in a matter of weeks, simply because it addresses several use cases. The functioning would be very similar to the ruby service you wrote, however it would also include the ability to get an ephemeral localhost URL so you can embed dropped images in pages without using imagealter, play desktop sourced video that the user has dropped, etc.

    Additionally, I think you'll be interested in the mime type filtering we added for 2.1.6. This would allow you to set up a drop target or file browse that only looks for the file types that you're interested in. Can you enumerate the file types (extensions and mime types) you care about and I'll make sure that they're supported by the platform?


    This all sounds awesome! I totally missed mime-type filtering being added, but that's a huge feature. Are mime-type definitions handled by the server or the B+ service? Are they determined by file extension or some other way?

    I'll start building up some of the other apps I've written with BrowserPlus in anticipation of the release of FileAccess.

    Thanks for your response--good to hear from you :)
    0
  • QUOTE (mattt@ymail.com @ Nov 11 2008, 04:50 AM) <{POST_SNAPBACK}>
    Are mime-type definitions handled by the server or the B+ service? Are they determined by file extension or some other way?


    Currently mime types are based on extension, with the exception of "application/x-folder" though we've talked about more robust ways of determining file type. Including open source libs that can determine via file magic number or "fingerprint", as well as using information from resource forks which spotlight populates on osx.

    This reminds me, we need to add to our API documentation to include the full definition of these "opaque file handles". they are essentially javascript objects with the following properties:

    name - file name
    size - file size
    mimeType - mime type
    BrowserPlusHandleID - an integer id that can be converted back to full path, out of reach of page javascript

    we'll get this added to doc.

    great to have you around!
    lloyd
    0
This forum is locked.

Recent Posts

in Support & General Questions