API Upload files not showing

  • 1
  • Problem
  • Updated 6 days ago
I am using a snippet of the sample Python (http://api.sharefile.com/rest/samples/python.aspx) to upload a file to a shared folder and getting back HTTP 200 with the response body = True

But when I go to the folder there is no file.

myFolderID : I get this from the "Folder details" 


Step 1.

https://[myTestDomain].sf-api.com/sf/v3/items([myFolderID])/Upload2?Method=streamed&FileName=test2.csv&...<br>
I have tried "Methods" standard & streamed


Step 2:
Using the "ChunkUri" in the response from step 1.  I post using multipart/form-data


The response is http 200 with body = true


Ouput of form post:


Data = ------------123456789
Content-Disposition: form-data; name="Filedata"; filename="test2.csv"
Content-Type: text/csv

fanem,lname
Shane,berk
------------123456789--
Photo of shaneB

shaneB

  • 1 Post
  • 0 Reply Likes

Posted 7 months ago

  • 1
Photo of Binod Thakur

Binod Thakur

  • 7 Posts
  • 0 Reply Likes
I have tried it with java. While making POST call on ChunkUri you need to attach the file as well. Without attachment, It will show 200 status but file will not get uploaded. Try to attach the file that you want to upload. It will work.

file name should be always File1 if you will change to either File/file1  it will not work. Just try to attach the file.