Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Can an external file's information be inserted into an attachment table as if it was uploaded via blob adapter?

I have an attachment table that works perfectly if the user uploads a file via the application. We need to be able to take externally generated files that are in the same directory and make them visible as attachments. I have inserted the file details into the table and the app sees the attachment, but when you click to view it I get the following error
Could not find file 'I:\CourtDataFiles\Attachments\Case\34\1008-judgement-6-932019.pdf'
The 1008- is not part of the filename. 1008 is the attachment id. Any ideas?

I would love to feed the file information through the blob adapter, but if there is any instructions on how to do that, I have not found them. I have been at this for days.
1 person has
this question
+1
Reply
  • Hi Jody, are you saying that some files are physically uploaded into the database and some only the file name with the actual file staying on drive I: ?

    If that's the case, is the name of the file put into the data record as well as the attachment ID? Is there a field in the record to say that it's an actual attachment or link to a file?

    If it's none of the above how do you actually load the data into the record?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi. I actually solved this one. To answer your questions, all of the files are stored externally. There will be a public access for 'published' documents and internal docs for logged in users. Our logged in users will be able to see them all as attachments. The problem I was running into was so obvious that I totally overlooked it. When the blob adapter saves the file, it places a key value followed by a dash at the beginning of the file name. I missed that, so I was not naming the files incorrectly.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • You can try overriding the ParseAdapterConfig method and change the path-template. Have a look at the method in this post: http://community.codeontime.com/codeo...

    One of the fields in the table should contain the file name. Use only {FileName} in the path-template instead of {ID}-{FileName}.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated