locked
redirect or stop a file-upload (annotation) RRS feed

  • Question

  • hi,

    i've written a plugin which redirects the upload of a file to an external system.
    i would like to disable the running upload without a errormessage (im doing it pre-stage on creating annotation)
    can i simply stop it there or set a variable to disable the upload?
    problem is, throwing a exeption has not the effect i would like to have (it shows the starndard exception that the fileupload didnt work and not my own exception)
    configuring the documentbody or setting the property 'isdocument' to false just causes showing up the same exception as with throwing a invalidpluginexception

    any solution or workaround available?

    thanks in advance :)

    Monday, October 5, 2009 3:50 PM

Answers

  • What I meant is - upload the annotation to the new place (from the plug-in) and delete it either in the sync/async post create.


    GI CRM Blog * GI Website
    • Marked as answer by Jim Glass Jr Tuesday, October 6, 2009 2:31 PM
    Tuesday, October 6, 2009 8:40 AM

All replies

  • Did you consider uploading the annotation and quietly (asynchronously) deleting it behind the scenes. This way you can avoid throwing / displaying the exception.

     

    Another option is to schedule a bulk deletion job that targets the entity annotations and delete them daily.


    GI CRM Blog * GI Website
    Tuesday, October 6, 2009 12:05 AM
  • that would be the fallback-solution. i would prefer a sync way, because the user may would expect the upload in place (the new one) instantly and not a few min, hours or even days later. (may 5seconds are ok, i ll take a look into that)
    i expect that async after uploading could possibly be done faster than the upload-page(right word?) what would cause the error to occur here and there, what seems to be even worse to me.

    edit:

    ok i ve done it async 2 little problems which arent too nice but i think are ok to live with..
    the uploader finalizes correct but:
    the attachment is shown as uploaded and the possibility to delete it is offered which will run into a not existant file
    aswell as the upload is shown in the note bin but runs into the same problem, the note bin is updated by hitting f5, before doing that it shows the error (or if not yet clicked the file in the note)

    woul appreciate a cleaner solution, if somebody knows feel free to help :)

    till here thanks
    Tuesday, October 6, 2009 6:49 AM
  • What I meant is - upload the annotation to the new place (from the plug-in) and delete it either in the sync/async post create.


    GI CRM Blog * GI Website
    • Marked as answer by Jim Glass Jr Tuesday, October 6, 2009 2:31 PM
    Tuesday, October 6, 2009 8:40 AM