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 7760271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:50:18+00:00 2026-06-01T13:50:18+00:00

I have managed to create a simple app which deletes (bypassing the recycle bin)

  • 0

I have managed to create a simple app which deletes (bypassing the recycle bin) any files I want to. It can also upload files. The problem I am having is that I cannot specify which collection the new file should be uploaded to.

def UploadFile(folder, filename, local_file, client):
    print "Upload Resource"
    doc = gdata.docs.data.Resource(type='document', title=filename)
    path = _GetDataFilePath(local_file)
    media = gdata.data.MediaSource()
    media.SetFileHandle(path, 'application/octet-stream')
    create_uri = gdata.docs.client.RESOURCE_UPLOAD_URI + '?convert=false'
    collection_resource = folder
    upload_doc = client.CreateResource(doc, create_uri=create_uri, collection=collection_resource, media=media)
    print 'Created, and uploaded:', upload_doc.title, doc.resource_id

From what I understand the function CreateResources requires a resource object representing the collection. How do I get this object? The variable folder is currently just a string which says ‘daily’ which is the name of the collection, it is this variable which I need to replace with the collection resource.

  • 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-01T13:50:19+00:00Added an answer on June 1, 2026 at 1:50 pm

    From various sources, snippets and generally stuff all over the place I managed to work this out. You need to pass a uri to the FindAllResources function (one which I found no mention of in the sample code from gdata).

    I have written up in more detail how I managed to upload, delete (bypassing the bin), search for and move files into collections

    here

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

Sidebar

Related Questions

I have managed to create a custom action in C# using MakeSfxCA which is
I have a simple CoreData app which allows you to add items to a
I have a fairly simple iPhone app which utilizes CoreData for object persistence. The
I am using Web2Py to create a simple app which sends Push notifications through
I have created some documents and managed to make some simple queries but I
I've deconstructed a standard WPF button using Blend and have managed to create a
I have a page which basically allows an admin user to create manager user
I have an Application (an appointment manager) which lets the user create usercontrols in
I am using core data in my iPhone app. I have created a simple
I have a simple Handlebars helper which simply formats a money value. The helper

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.