Hi all, hope someone can help me with this:---------------------------------------------------
Objective: Create a Notes Document with an Embedded file uploaded from an HTML non notes Form.
<> Create an HTML file with the following code:
MY_HTM
<input type="file" name="file" />
<input type="submit" name="Submit" value="Submit" />
<> Create the uploader.nsf database with an agent with the following code:
Sub Initialize
Dim S As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
'----------------------------------
Set db = s.CurrentDatabase
Set doc = s.DocumentContext
Print Cstr(DOC.GetFirstItem("request_content").values(0))
End Sub
<>Open the HTML file, browse a file and Submit it; it will activate the agent and your browser will display something like the following:
-----------------------------987622347026 Content-Disposition: form-data; name=“file”; filename=“eyes.gif” Content-Type: image/gif GIF89a ¸ ╠ Ö f 3 ╠ ╠╠ ╠Ö ╠f ╠3 ╠ Ö Ö╠ ÖÖ Öf Ö3 Ö f f╠ fÖ ff f3 f 3 3╠ 3Ö 3f 33 3 ╠ Ö f 3 ╠ ╠ ╠╠ Ö╠ f╠ 3╠ ╠╠ ╠╠╠╠╠Ö╠╠f╠╠3╠╠ ╠Ö ╠Ö╠╠ÖÖ╠Öf╠Ö3╠Ö ╠f ╠f╠╠fÖ╠ff╠f3╠f ╠3 ╠3╠╠3Ö╠3f╠33╠3 ╠ ╠ ╠╠ Ö╠ f╠ 3╠ Ö Ö ╠Ö ÖÖ fÖ 3Ö Ö╠ Ö╠╠Ö╠ÖÖ╠fÖ╠3Ö╠ ÖÖ ÖÖ╠ÖÖÖÖÖfÖÖ3ÖÖ Öf Öf╠ÖfÖÖffÖf3Öf Ö3 Ö3╠Ö3ÖÖ3fÖ33Ö3 Ö Ö ╠Ö ÖÖ fÖ 3Ö f f ╠f Öf ff 3f f╠ f╠╠f╠Öf╠ff╠3f╠ fÖ fÖ╠fÖÖfÖffÖ3fÖ ff ff╠ffÖfffff3ff f3 f3╠f3Öf3ff33f3 f f ╠f Öf ff 3f 3 3 ╠3 Ö3 f3 33 3╠ 3╠╠3╠Ö3╠f3╠33╠ 3Ö 3Ö╠3ÖÖ3Öf3Ö33Ö 3f 3f╠3fÖ3ff3f33f 33 33╠33Ö33f33333 3 3 ╠3 Ö3 f3 33 ╠ Ö f 3 ╠ ╠╠ ╠Ö ╠f ╠3 ╠ Ö Ö╠ ÖÖ Öf Ö3 Ö f f╠ fÖ ff f3 f 3 3╠ 3Ö 3f 33 3 ╠ Ö f 3 s à ٹ 2ú\3rö S×!i¼Gä¢pƒÊ¬┼▒Tö└y¬╩ö║─å┤ÐóãȬ╠ı▒¤ÃÉ┐Ðú╦ÎÁÈ▀╚¦¦├█┘║┘▄┴ßÔÐþß═Ú█┬ٵϬßÐ÷ÚÔ¸ÞÓ³Ûµ²ÙÛ²´‗ ‗¹ j Y J % !¨ , ß 8゚wµð¢[w┴ü§ÓÁc»×└{¸, ─W´¦─y→■│þ«8uCntn╣x* rä7/Õ¢v¬ÏÁ[Ã.£Ow´¶ ¢Gn[ÂlÏf§Ù7╦ƒ?~┘©ÕËÅ[Tm¹«iÕ¸H█#º³‗┘淄>nÏʬ¾À¤¢tI▒ıS7ÄÌTr┌ãu├å- Ø╝4K╗═3G´ÌÈ|Õ║iÙV╬]7Ñyßü#Gn]<{¸õÑ+'n_┐«ÓͲâþ¯£ÚpÕã}ËåM█Àqþµü$
<> Can you convert the “eyes.gif” from the request_content field from the posted form into an Embedded GIF file in the context document??
I don’t know how to make this……CAN ANYONE HELP?
Good Challenge Eh!?
s Paulo