Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated File Upload from Unix Command Line via CURL

Status
Not open for further replies.

hutstein

Programmer
Nov 28, 2008
4
DE
I try to make an automated file upload to Livelink using the CURL Command, which simulates a browser call.

I'm able to login, upload a file and logout, but the uploaded files don't get their according type assigned. They are just Documents and not PDF, or PPT for example.

I'm also missing the "Open" or "Download" link on my uploaded files. But if I use the ShortLink to Open one uploaded file it will be opened correctly! What am I missing?

I'm sending the correct content-type and all other values sent along when submiting the original form used in Livelink

Thanks in advance
Andreas
 
the browser is supposed to send the mimetype if it is not livelink tries to auto recognize it and failing that will set it application/octet-stream.So I would check if a manual upload assigns the right mimetype.Sometimes windows regitries entries turn out as the culprits.If you know the application mimetype there is an article in the KB that tells you how to assign new mimetypes in the opentext.ini although most stanadard mimetypes and thir extensions are already included in the mime.types file.I would definitely rule out browser issues by "curling" from another computer as well.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937

Certified OT Developer and probably certfiable,Livelink ECM Champion 2008
 
hmmm... I still thought that it must be some kind of mime type problem. But I can't figure it out!

I'm still using the correct mime type:
application/pdf when I upload a test.pdf file.

Now I will try uploading it with application/octet-stream but I don't know what else I could do...
 
By the way the filesize displayed in Livelink is also 0 KB, but the file is uploaded completely, because I can download it with the ShortLink.

application/octet-stream didn't work at all.
 
Note the dataid of the object and run the query
select * from dversdata where docid =<dataid of object>

look in the FileType column and MimeType column that will tell you what the browser sent livelink.As a workaround I had to once write a scheduled job that puts the right mimetype as there was an app that just would not send it right.
a 0 KB file that can be downloaded?
That does not sound right unless your livelink URL is a RemoteCache URL.(The main server does not get all the params until the RC agent has run)



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937

Certified OT Developer and probably certfiable,Livelink ECM Champion 2008
 
hmmm... I'm just an end user and have no acess to the database behind.

I still got it working, but I hadn't the time to figure out why it's suddenly working.

I'll try to find the solution and let you take part on it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top