Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7972077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:46:26+00:00 2026-06-04T07:46:26+00:00

I have a image that I need to save in a Sharepoint site under

  • 0

I have a image that I need to save in a Sharepoint site under shared documents

For various reasons the image has to be in a system.drawing.image and be saved in the shared documents within the sharepoint site. it does not have to be saved in a local hard disk.

Have you got any solution?

so far I am gtrying

 MemoryStream ms = new MemoryStream();
 imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);
 byte[] imagebyte = ms.ToArray(); 

then Savebinary function of the streamreader but no joy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:46:27+00:00Added an answer on June 4, 2026 at 7:46 am

    Starter for ten, you will need to change some of the hard coded settings in here

     public void addToSharepointImageList(string folderName, string fileName, byte[] content)
        {
            string path = @"\\yoursite\yourlistname\";
            string baseSharePointPath = "http://yoursite/";
            string listName = "yourlistname"; 
            SharePointImagingService.Imaging svc = null;
    
            try
            {
                path += folderName;
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
    
                #region create sharepoint service
    
                svc = new SharePointImagingService.Imaging();
    
                NetworkCredential nc = new NetworkCredential("username", "password", "domain");
                svc.Credentials = nc;
                //svc.Credentials = System.Net.CredentialCache.DefaultCredentials;
                svc.Url = baseSharePointPath + listName+ "/_vti_bin/imaging.asmx";
                svc.Discover();
    
                #endregion
    
                svc.Upload(baseSharePointPath + listName, folderName, content, fileName, true);
            }
            catch (Exception e)
            {
                //deal with error
            }
            finally
            {
                svc.Dispose();
            }
    
        }
    

    or, if you are trying to just save the file directly to a non-image list you can treat sharepoint as a giant file share and just open a filestream and write the byte array there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image that I have in my bundle resources that I need
So here's my issue. I have an image that I need to shrink. The
I have a container that contains an image that I need to drag from
I have a slow connection that I need to send a PNG image over
I have a BufferedImage with an IndexColorModel. I need to paint that image onto
I have this method that changes an larger image source on click. I need
I need to make the program which have one form that contains PNG image
I have an array of ushort pixel data that I need to save as
I have created a histogram using (hist) function... after that, I need to save
Hey guys, I have an image that I'm downloading from the internet and need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.