UNSOLVED

aashishpatil

updated

17 years ago

A

aashishpatil

2 Intern

212 Posts

0

6657

August 3rd, 2009 08:00

Signature Mismatch when using EsuApi.getShareableURL()

Hi Raj

The error does not happen on the method call but when navigating to

the URL returned by the call.

Object create seems to be working. The app as a first step creates

objects and that seems to be working. Have not tried list in this app

but another piece of code had it working.

Not tried delete.

Thanks

Aashish

Sent from my iPhone

Message was edited by: Aashish123 Patil Thread was branched off from another thread

  • JasonCwik

    281 Posts

    980

    0

    Posted August 10th, 2009 13:00

    Hi Aashish,

    Are you passing in an ObjectId or an ObjectPath?  If it's an ObjectPath, what is the full path name?

    Thanks,

    Jason

  • aashishpatil

    2 Intern

    212 Posts

    980

    0

    Posted August 10th, 2009 13:00

    It's an object id not path. I've sent the code to Raj. Will post it

    here when I am back online.

    Thanks

    Aashish

    Sent from my iPhone

  • rbala1

    222 Posts

    980

    0

    Posted August 14th, 2009 07:00

    Jason,

    Here's the code that Aashish sent:

    String  atmosId =  attachment.getProperties().get("atmosObjectId");
    System.out.println("Got  atmos Id: " + atmosId);
    if(atmosId != null && atmosId.length() >  0) {
    try {
    EsuApi api = EsuHelper.getEsuApi();
    long curTime =  System.currentTimeMillis();
    Date expire = new  Date();
    expire.setTime(curTime + (60 * 1000 * 60)); // set for an hour in  the future from current time
    URL atmosObjUrl = api.getShareableUrl(new  ObjectId(atmosId), expire);
    System.out.println("atmosUrl " +  atmosObjUrl.toExternalForm());
    response.sendRedirect(atmosObjUrl.toExternalForm());
    }  catch(Exception ex) {
    System.out.println("Error dispatching to  atmos:");
    ex.printStackTrace();
    }


    He gets the signature mismatch error when attempting to use the shareable URL returned in the call when trying to display it in a browser. 
  • rbala1

    222 Posts

    980

    0

    Posted August 17th, 2009 10:00

    Aashish,

    We have confirmed this to be a bug with Atmos Online.  I'll keep you updated as to when this will be fixed.

    Raj

  • scot4

    18 Posts

    980

    0

    Posted March 8th, 2010 07:00

    This has been resolved, make sure you get the latest bindings (1.2.5.13 at time of post) from http://code.google.com/p/atmos-java/

    Scot

  • aashishpatil

    2 Intern

    212 Posts

    980

    0

    Posted April 1st, 2010 15:00

    Confirmed that this is working.

    Thanks,

    Aashish

  • aashishpatil

    2 Intern

    212 Posts

    980

    0

    Posted April 1st, 2010 17:00

    A suggestion -

    It would be nice if the object returned by the shareable URL is assigned a "file name" so that when the URL is opened the user is provided an option to "save as". Maybe the name could be part of the shared URL that Atmos then returns as a Content Disposition HTTP header.

    Thanks,

    Aashish

  • rayh2

    41 Posts

    980

    0

    Posted April 1st, 2010 18:00

    I could not agree more. This would be very useful functionality. Currently users will be presented with a download dialog which is confusing because there is no file type association. It work if you give the file the correct extension but again this is confusing.

    atmos_dialog.jpg

  • scot4

    18 Posts

    980

    0

    Posted April 12th, 2010 13:00

    You can pass a path to getShareableUrl rather than an ObjectID, this forces you to create your files using the namespace interface.

    ObjectPath path = new ObjectPath("/samplepath/tosampledata.xls");
    getAPI().getShareableUrl(path, new Date("Dec 28, 2018"));

  • aashishpatil

    2 Intern

    212 Posts

    179

    0

    Posted April 12th, 2010 13:00

    Thanks Scott!

    We did try that and it worked just as you mention.

    Would be nice to have this functionality for the object id interface too.

    You could consider this to be a feature request.

    Another request would be the ability to set the 'objname' attribute for the

    object id interface. This is an odd system attribute and it really belongs

    in the realm of user attributes.

    Just curious - does it matter if set the content type to an appropriate mime

    type when uploading an object or it is ignored and always considered to be

    application/octet-stream?

    Regards,

    Aashish