Access Image File from path in Web Application [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am having an Web Application(ASP.NET MVC, C#), in which I have a functionality of uploading an excel which contains image path. So I need to know can I access the image files from the application?
PS: Images and Excel will be in the user system.

You could make the users send the real images within the file instead of sending only the paths. This would potentially generate a huge file to upload, but I don't know you application.

If image is at user location then there is no way you can access it (how insecure it would be if any website can access your image file in your system)
So your will need user to upload image as well inorder to use it

Related

How can I copy files from filepath mentioned in cells in excel in my server using c#? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am trying to build a bulk upload functionality on an ASP .NET page. this is required to upload questions and answers in a SQL table. There can be images as well in the question and the answers. For those images, the path to image can be specified.
Is it possible to copy the images from end user's machine to the server and then move these images into the SQL database?
"Is it possible to copy the images from end user's machine to the
server"
Not unless you provide a file input control explicitly on the page and the user puts the necessary file(s) into that control and they get uploaded along with your other data.
Your server does not have access to the user's machine. In fact it almost certainly doesn't even know exactly which machine the request came from. It certainly doesn't have access to any of its disk drives, unless the machine has its own specific public IP address and appallingly lax firewall and security settings.
In fact even your webpage, when it's rendered in the user's browser - which is on their machine - doesn't have access to the disk (think of the implications if a webpage could randomly read files from your disk!) except via a file upload control where the user has to specifically choose which files to send to the server.

How to find the path of a file using asp.net [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am creating a website in which I need to find out the path of the downloaded files.For instance if there is an image Image1.jpeg, downloaded and saved somewhere in the system.Is there a way through which we can find out the path of that image?
If you mean: how to retrieve an uploaded image, the answer is: not possible. An uploaded image (or just any file) consists of a name an a list of bytes. You have to save it yourself.
If you are asking about downloaded files on the client, well, they are on the client, so outside of your control.

PDF Files In C# Resources [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to save some PDF files in C# project resources. How can I get that resource at run time in stream format to show in PDF viewers correctly? Or have you an idea for this
solution, to embed some PDF files in a class library and show them in a free PDF viewer?
You can use a web control for viewing PDF read the second answer here View PDF through C# .Net desktop App
Your question is vague be precise for better help.

Fetch images from Drupal with c# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to fetch images from a Drupal DB to a C# program.
In Drupal DB the image path is:
"public://yourimage.jpg"
However, this is not a usable URI for C#.
How can I get images from Drupal to C# in a secure way?
If you are going to fetch the images from a database, the URL is not important, what you need to know is if the image is in the database and in wich tabel, and if images are stores in file system, in which table is the path. Then, use plain Ado.Net to get those images.
If instead you want to fetch images from the web, then you'll need to build some kind of grabber. Maybe CsQuery project can help you in that..
https://github.com/jamietre/CsQuery

Moving files from PC to MAC [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to ask how can I copy files from PC to MAC using C#. Also my application will create new folder when needed and copy / move files in them
By which technology you want to move files ?
1- Over the network ? using Directory access protocols ?
2- Through Web ?
Each has different aspects. as for network you just need to have access to mac on windows computer and tell them path. using **SYSTEM.IO** name space you can easily copy files from one directory[Windows] to other[MAC] using their path. Window will take care of permissions but be sure the user which you are using to access has write permission to folder where you are copying files.
Through web you might need to implement web programming to read and write each file you post.

Categories