How do I use uploaddoc parameter when using the Create Task method of the Project API?
I'm trying to create a task and attach a file using the Create Task method of the Project API.
The uploaddoc parameter is of type "file". There is no sample code on how to use the uploaddoc parameter.
I assume the uploaddoc file parameter is looking for a binary file, but I'm unsure how to specify this in the code.
I've been able to use other methods of the API correctly.
The code below successfully creates the new task and completes without error, but there is no file attached to the task.
Please provide examples of how to use the uploaddoc parameter.
Thank you.
FileName := CHSDirectory . "HITRUST Templates\" . FileName
URL := "https://projectsapi.zoho.com/restapi/portal/99999999/projects/" . ProjectID . "/tasks"
Data := URL . "/?authtoken=999999" . "&name=" . TaskName
ADODBObj := ComObjCreate("ADODB.Stream")
ADODBObj.Type := 1
ADODBObj.Open()
ADODBObj.LoadFromFile(FileName) ;Load the contents of the binary file into the Stream
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("POST",Data)
WebRequest.SetRequestHeader("uploaddoc", FileName, "multipart/form-data")
WebRequest.Send(ADODBObj.Read())
ADODBObj.Close()
JSONString := WebRequest.ResponseText
MsgBox Response - %JSONString%
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Building extensions #10: Fetch customized user inputs, store them globally at the app level, and access them across entities
This data storage concept enables you to store data related to your extension for both entity properties and extension properties. In our previous piece, we looked at how to store data for entities using entity properties. In this post, we'll look at
Building extensions #9: Store, retrieve, and access entity-specific data in widgets using data storage
Data storage - Overview Storing data related to the extension you are working on is essential. It can be saved as key-value pairs for an entity or extension, known as entity and extension properties, respectively. Data can be saved for the following entities
Building extensions #7: Create custom widgets for a simplified end-user experience
Discover the benefits of using widgets! We explored the significance of widgets, prerequisites, and the availability of JS SDK methods as part of our previous post. In this post, let's go over a detailed example of using widgets along with certain Zoho
Building extensions #6: Custom user interfaces with Widgets
Welcome to our post on Widgets for Zoho Projects! In our last post, we explored the significance of the connections feature, showed how to use it, and provided an example use case. In this article, we'll look at the importance of widgets, another feature
Building extensions #5: Integrating applications with Zoho Projects through Connections
In our last post, we discussed the essential features that a Zoho Projects extension can provide. Starting with this post andin every subsequent post going forward, we'll go through each of those features in depth, one by one, with an example use case.
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.