Author Topic: File Upload Script  (Read 1958 times)

0 Members and 1 Guest are viewing this topic.

Offline daniel_boc

  • Occasional poster
  • *
  • Posts: 1
    • View Profile
File Upload Script
« on: January 31, 2018, 07:55:30 PM »

I am trying to upload files via script. Is there any way to do this via powershell or curl?

I have tried via powershell with this :
#File to Send

#http server
$http = "http://meu-ip"
$user = "user"
$pass = "passwd"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass) 

$uri = New-Object System.Uri($http+"fileDestName.txt")
$webclient.UploadFile($uri, $itemName)}#end try

Write-Host $error.exception.message

but this return erro 404 - Not Found....

And i have tried with this in curl:

curl --user login:password --upload-file "filepath" http://meu-ip/namefile

but this return the same erro 404 - Not Found.

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 900
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: File Upload Script
« Reply #1 on: February 03, 2018, 01:50:45 PM »
there were other post on the forum with other users trying to upload file to hfs via script. unknown if any were successful.

id use w g e t html-put method or cURL:

here is what i have found on previous posts:
Files i try to keep and share can be found on my google drive: