How can we provide the path for the image file in order to create the multimedia component in server? - tridion-2011

I am trying to Create a multimedia Component where
1) I am executing my code in client machine
2)Target where it should create a component is one of the test server.
3)Here i am using the http Coreservices added as the Service Reference.
but the part in which i am getting error is the path for the image file for the multimedia component.
Case:1) I am selecting the Image file from the client machine -
In this case i am getting error in the component creation stage stated:
Unable to get file size of 'file:///C:foldername/image.jpg' Could
not find a part of the path 'C:\foldername\image.jpg'.
Case:2) I mapped the test Server in client machine so it created the Z drive and i am selecting the image file
In this case i am getting same error at component creation stage:
Unable to get file size of 'file:///Z:/foldername/image.jpg' Could
not find a part of the path 'Z:\foldername\image.jpg'.
My question is , How can we provide the path for the image file in order to create the multimedia component?

I got my answer and able to create the multimedia component to the target server:
have used
StreamUpload2010Client streamClient = new StreamUpload2010Client();
and stored the file at templocation and uploaded it from there.
thanks

Related

Move file using Microsoft power automate in share point

I am trying to move a newly uploaded file in sharepoint using power automate. I have used two connectors 1) When a file is created in a folder 2) Move File. I have used file identifier as dynamic content in the move file connector. When i tried i got this error.
Error Message - Missing or mismatched field definition on the destination list for source field 'RequestType' type 'Text'. Source site template id 'GroupWebTemplateID', target site template id 'GroupWebTemplateID'. Total blocked root objects in this operation is 1.
Am i using a wrong connector or wrong dynamic content

Meteor , read an image stored on server outside public folder

i can't resolve image file's path on my server from my meteor app to use it as a source of my image tag , also i don't want to put it in public folder as it refreshes due to meteor watching with every image upload.
For this you can use Meteor-files. This packages allow you to insert file in your database. also you can work another thing with this packages

Web Service returning images? Best solution?

i'm wondering what's the best solution of returning images from a web service?
My previous enterprise project stores images on a server's hard drive.
1 - Make sure the image's name is distinctive by adding time stamp to name during uploading an image to server.
2 - Store image name in web service
3 - get image by calling 'url + image name'
Is it a good or bad solution? Or how do you implement this? Thanks.
You have to create table (tblUploadFiles) in database for Upload files and that table should have at list following columns.
FileId
FileName
FileStoreAt
DateOfUpload
FileType
IsActive/IsDeleted
OtherDetails
And Use Web Services to return any file with original name and If possible all files store at secure location.

How to check that Image is already exist or not on given path in GWT + MVP4G

I want to check if the Image exists or not on the fileSystem. I am using GWT 2.4 with the MVP4G framework. When I use IO.File on the client side to check file.exist(), it gives me an error because we cant use IO on client side, so How can I check this..?
How did you get the image?
The only way you should get the image is by using some file upload mechanism and any one of those will only let the user choose an already existing file; so there is actually no need to check for the file existence.
For file upload you can use the gwt library gwtupload. or use apache File Upload library.

using an image embedded in a directory of a dll

I have a .NET 4.0 class library with a directory called Resources, with an image called Logo.bmp inside it set to be compiled as an embedded resource.
In my main application I add the dll reference and set a Uri to pack://application:,,,/ResourceImages;component/Resources/logo.bmp and then I try to get the resource stream to that resource (using Application.GetResourceStream(myUri)) but it can't find the resource specified.
If however I put the image in the root directory of my dll and take out the Resources/ it can find and return the resource stream without issue.
Any suggestions?
to anyone else who might be having this particular issue, make sure that you build the string to pass into the new uri BEFORE you make the new call, not during. I changed it so that the pack: location string is all created ahead of time and now it works

Resources