Hello
I want to file upload in asp.net c# using api url and key.
anyone can help me.
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Jul 13, 2016, 11:22 PM EDT
Ravi PatelRank #439 · 5.7K reputationPosted Jul 13, 2016, 11:23 PM EDT
Pankil BhattRank #2,947 · 489 reputationPosted Jul 13, 2016, 11:24 PM EDT
api is tired party.
Pankil BhattRank #2,947 · 489 reputationPosted Jul 13, 2016, 11:27 PM EDT
Pankil BhattRank #2,947 · 489 reputationPosted Jul 13, 2016, 11:30 PM EDT
and check the files status
$key = "PUT YOUR API KEY HERE"; $settings['file_contents'] ="@/home/Downloads/emails.txt"; //path to your file $url = 'https://Testurl.com/api/verifApiFile?secret='.$key.'&filename=my_emails.txt'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $settings); $file_id = curl_exec($ch); //you need to save this FILE ID for get file status and download reports in future curl_close($ch);
for upload file
AND
$key = "PUT YOUR API KEY HERE"; $url = 'https://Testurl.com/api/getApiFileInfo?secret='.$key.'&id=10700'; $string = file_get_contents($url); list($file_id,$filename,$unique,$lines,$lines_processed,$status,$timestamp,$link1,$link2) = explode('|',$string); //parse data
to check file status
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Jul 13, 2016, 11:33 PM EDT
Pankil BhattRank #2,947 · 489 reputationPosted Jul 13, 2016, 11:34 PM EDT