Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

file upload

Posted on 2003-02-27
8
Medium Priority
?
309 Views
Last Modified: 2013-12-18
hi,

i use domino's file upload function to upload file to the web. after i uploaded the file, the icon will show below the bar. is there a way to change this icon to a link and place it where i want it to be?

thank you very much..
0
Comment
Question by:janelow
  • 4
  • 4
8 Comments
 
LVL 7

Expert Comment

by:scottrma
ID: 8035463
This is called a V2-style attachment (because this is the only way in Notes V2 to attach a file). Here is how you can convert them to an attachment within a rich text field of your choice:

http://www-1.ibm.com/support/docview.wss?uid=sim28f4e788a80ca087285256cc200810f31

Regards,

Scott
0
 

Author Comment

by:janelow
ID: 8040954
thanx for the reply.

i don't need to show the content of the attachments in a rich text field. just need to show the link at a specific location in the form.

i use $V2AttachmentOptions with the value "0". this will hide the whole icon, including the link. can i just have the link? how do go around doing it?

thank you very much


0
 
LVL 7

Expert Comment

by:scottrma
ID: 8043577
You could create some computed text on your form that would serve as an HTML link to the attachment using the $FILE URL syntax to reference the attachment. Something like this:

"http://" + your_server_name + "/" @Subset(@DbName; -1) + "/" + view_id + "/" + doc_id + "/$FILE/" + @AttachmentNames

If there are multiple attachments, the concatenation operator should concatenate each name returned by @AttachmentNames with the rest of the string, producing a link to each separate file. In the above example, you would have to also create some hidden computed fields to calculate the value of the your_server_name, view_id, and doc_id parts of the URL - these can be calculated by parsing the Query_String CGI field.

Hope this helps.

Scott
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:janelow
ID: 8087693
sorie. i still have problem.
i've tried the solutions suggested but i still can't get the link to work. it returns the file not found error. can i replace the doc_id with the form name instead?
please correct me if i'm wrong here.

i've also tried placing this coding as pass-thru html in the form
<a href = "http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/filename?OpenElement">(filename)</a>

the filename in brackets is a computed for display field with the
value @AttachmentNames. the link will display as where i want it but
it will show the 'can't find' error when i click it.

so i've changed the link to
<a href = "http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/">(filename)</a>
and it will display the internal server error.

i've also tried the link i found in designer help, which is
<a href = "http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/InternalFileName/Filename?OpenElement">(filename)</a>.
it will display the 'can't find' error..

i have another problem is that when i edit this document, how do i delete the previous attachment if i want to? if i just use domino's default upload function, it has a 'mark attachments for deletion' checkbox. if it requires too much effort then it's okie. i'll skip this part.

thanks a lot for any help.
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8107387
The link should be:

http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/filename

in which case ceeb1319541daa6348256caa002a662f should be the UNID of the view from which this document is looked up. It MUST be a sorted view. The first sorted column must have a value of frmthesis for this particular document. Easy way to test this is: open the view in Notes client (not web browser), start typing "frmthesis" and hit Enter (quick search a.k.a. jump to particular key value in sorted view). It should say Found 'frmthesis' in the status bar and your cursor should now be selecting the document in question. If not, or it says "Could not find 'frmthesis'", then it will not work on the web either.

As long as the document can be retrieved in this manner, then the rest of the URL, /$File/filename, should work without any problems to reference the attachment.

As for deleting previous attachments, you could probably do this with a small LotusScript agent called from the form's WebQuerySave event. I would do this for you, but at the moment I am incredibly busy, if you are interested in pursuing this, I would post a new question, and there are probably plenty of experts that can do this for you fairly quickly.

Regards,

Scott
0
 

Author Comment

by:janelow
ID: 8118885
thanx scott for the reply. it's okie. i'll post another question if i really need it.

however, i still can't get the link to work. i think it's because the link doesn't refer to the attachment. the link will end with filename for all the links, instead of the name of the attachment file.

good day.
0
 
LVL 7

Accepted Solution

by:
scottrma earned 120 total points
ID: 8120524
Sorry, I thought you were using "filename" as a generic variable to refer to the file names. I didn't realize you were using it as a string literal. What you would want to do is to make your HTML link a computed text field (allowing multiple values). The first part of the link is constant:

"http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/"

The second part of the link is calculated by Notes before converting to HTML and sending output to the browser:

@AttachmentNames

and if there are multiple attachments, Notes will form a link for each one. Therefore, your formula for the computed text field should be a concatenation of the first and second parts:

"http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/" + @AttachmentNames

This will cause Notes to produce the following for the field:

http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/file1.exe
http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/file2.exe
http://localhost/ResourceCentre.nsf/ceeb1319541daa6348256caa002a662f/frmthesis/$File/file3.exe

if there are files called file1.exe, file2.exe, and file3.exe attached to the document. You should probably choose "New Line" as the multi-value separator in the field properties so that you don't have multiple URL links on one long line.

Regards,

Scott
0
 

Author Comment

by:janelow
ID: 8223235
thanks scott,

pls don't apologize coz probably my question wasn't clear enough and i'm the one asking for help. i've tried lotz of times and still don't get it... my supervisor doesn't seem mind with the default display so i just let it go.... and the project has come to tis due date. anyhow, thanx for all the help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question