srinu:I want full path of the image. So i can store that path in my database.
Can you please give me curl through return full path code.
Is there anyway through curl , we can get the fullpath of the uploaded image.
On the sample code above the $return variable will return the response which contains the size bytes of the file uploaded and any errors that occured. If you have called the method above then you would have provided the full path along with the filename. The path in the account would be &destFolderPath=$folder which is passed in the URL. The $filename which is passed directly to the method lets you set the exact filename.
Let me know if you have any further questions about this.
Peter Eussen:What i used to obtain a link was using the /ws/IMFS/GetDownloadLinks.ashx call. This call gives you a download link from where you can download the file. Downside is that this link requires a expiration date. I have not found another way to get a permanent download link :(
You are correct that expiration needs to be provided. However, the expiration given can be quite a long time in the future making it a nearly permanent link. The problem with this method is the inability to disable the link if you no longer wish to share it out. This is a good argument for the CreateHostedItem which you describe as well.
Peter Eussen: Pardon, you probably need CreateHostedItem call.. the PDF is not clear, but the sample REST reply shows that you get a download link, though the documentation does not show it in the Output value list
The CreateHostedItem allows you to set a folder or file (Recursive to the children, files and folders) to be public. In this case the construction of the link is up to you since it can be constructed without a token.
To build the path to a particular file you will need to call GetDownloadNodes to retrieve the node where the file is best served from or simply point them at services.nirvanix.com to automatically redirect. You need the account, username and full path as shown below:
http://nodeX.nirvanix.com/ApplicationName/Username/Path/file.txt
The node in this case is retrieved by the GetDownloadNodes or you can simply build it as http://services.nirvanix.com/appname/username/path/file.txt but will incur a redirection.
I hope this clears things up.
Regards,
Barry R.