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

  • Home
  • SEARCH
  • 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 6099079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:13:54+00:00 2026-05-23T13:13:54+00:00

Adding files to a specific directory using rackspace cloud files, c# bindings api more

  • 0

Adding files to a specific directory using rackspace cloud files, c# bindings api more specifically reference: https://github.com/rackspace/csharp-cloudfiles

For some strange reason doing something like:

    public static void UploadFile(CSImageDTO file)
    {
        var connection = new Connection(UserCredentials);
        var containerItemList = connection.GetContainerItemList(ContainerName);

        if (!containerItemList.Contains(file.Filename))
            connection.PutStorageItem(ContainerName, file.File, Path.Combine(MyPath, Path.GetFileName(file.Filename)));
        else
            throw new NotSupportedException("we dont know what to do now...");
    }

Presuming MyPath = “Funky”;

This adds files like so:

  • Funky/Image1.jpg
  • Funky/Image5.png
  • …

I could get the file path using Path.GetFileName(filepath) and return that to the view, but I want to know my files are not stored under the directory “Funky”, instead the actual file name is called "Funky/Image1.png"? or so it appears using my code:

 public static IEnumerable<string> GetFiles()
        {
            var connection = new Connection(UserCredentials);

            var parameters = new Dictionary<GetItemListParameters, string>();
            //parameters.Add(GetItemListParameters.Path, MyPath);

            var containerItemList = connection.GetContainerItemList(ContainerName, parameters)
                .Where(x => Path.HasExtension(x));
            //.Select(x => Path.GetFileName(x));

            return containerItemList;
        }

Also note: I have to use this filter to make sure I dont get the file folder back…

.Where(x => Path.HasExtension(x));
  • 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-05-23T13:13:55+00:00Added an answer on May 23, 2026 at 1:13 pm

    Because it is a Flat file system…

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

Sidebar

Related Questions

Adding source files more than one directory away (e.g. ../../source.cpp or ../../../somewhere_else/source.cpp, vs. just
Would there be any point in adding resx files to a distributed cache? What
i am having a problem in adding the image files to project namespace. I'm
While adding two language code files i.e. C# and VB.NET to App_Code, got an
1- Resource files suppose to be added on adding some resource in application like
I'm adding an existing site to SVN. The files already exist on the webserver,
I'm trying to generate POJO's from mapping xml files. I read something about adding
I working on adding file uploading to my web application. I'm using an iframe
I am adding elements to an XML file during installation using the XmlFile element:
I am using Codeigniter and I am trying to upload multiple files into a

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.