Add file

The 'add file' feature is to as the name indicates to help you with adding a file to a resource in your HydroShare account. This feature works smoothly without any glitches.

The way you could go about performing this function is by following the instructions below:

Step 1: Sign into HydroShare using your credentials

In the boxes below you enter your HydroShare username and its password. If you have to make an HydroShare account, click here.

Step 2: Enter in the Resource ID and choose the file you wish to upload

The resource Id is a unique identifier for every resource on Hydroshare. You can findit by browsing to your HydroShare resource copying the ID from the URL. Like for example, this is an example hyperlink https://www.hydroshare.org/resource/08c6e88adaa647cd9bb28e5d619178e0/ from which the 32 letter combination at the end is called the resource id. And so the resource id from the example hyperlink is 08c6e88adaa647cd9bb28e5d619178e0

Resource ID

The resource ID will help you locate the resource that you wish to add the file to the respective resource.

Now chose the file that you wish to upload

Once the file is selected, Click the 'Add' button below to add it to the resource.

Learn more:

To try this on your own, you can use the code snippet below that is used in this demonstration.

    
      auth = HydroShareAuthBasic(username= username, password= password)
      hs = HydroShare(auth=auth)
      fpath = temp_zip_path 
      resource_id = hs.addResourceFile(resourcein, fpath) 
      messages.error(request, "File added successfully")
      
if has_errors:    
  
      messages.error(request, "Please fix errors.")