How to UPLOAD a file to MEDIAFIRE.com using PB code?

Just starting out? Need help? Post your questions and find answers here.
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by StarWarsFan »

A filedrop is for example this one, where you can drag and drop to upload:
---LINK REMOVED---

After I can now use PB-code to download a file from Mediafire (THANKS TO INFRATEC!!)
I wish to upload a file to such a filedrop.

How do I get this achieved?
Has anybody done this and can help me?
Mabye infratec again? Have you also got a solution to upload a file to a Mediafire Filedrop?
Last edited by StarWarsFan on Tue May 10, 2022 11:08 am, edited 1 time in total.
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by infratec »

It is not possible (without days of work) to emulate the filedrop.

I don't know mediafire, but isn't there an other possibiity to upload a file?

Upload from web
instead of
From Computer
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by StarWarsFan »

Ouch, I was hoping that'd be as easy as DOWNLOAD a file, where you instantly had a solution.
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by NicTheQuick »

Mediafire provides an API to communicate with their service. No need to revserse engineer something on your own: https://www.mediafire.com/developers/
See also here: https://www.programmableweb.com/api/mediafire-rest-api
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by Olli »

@Starwarsfan, thank you for this idea.

and

thank you too to NicTheQuick for the API links.

I found this link : http://developers.mediafire.com/index.php/REST_API

Unhappily, I get a 404 error page... Is it the same page for you ?
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by NicTheQuick »

My second link seems to be outdated. But on the first one you can find a link to the Core API: https://www.mediafire.com/developers/co ... g_started/
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by Olli »

The last link is okay for me NicTheQuick. Thank you.
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by StarWarsFan »

Olli wrote:@Starwarsfan, thank you for this idea.
You are welcome. I have so many ideas...just often do not know how to get stuff into code...
Olli wrote:I found this link : http://developers.mediafire.com/index.php/REST_API
Unhappily, I get a 404 error page... Is it the same page for you ?
I found that page at least in the webarchive in the meantime:
https://web.archive.org/web/20130326104 ... p/REST_API

My issue with this is: How do I use that API in PB-code?
I have no idea where to start.
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by infratec »

First you have to create an app key inside of your mediuafire account.

Then you can create a post request to get a session token.
With this session token you can do the fileupload.
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by StarWarsFan »

Try the link in post#1, no login necessary in order to upload a file to a filedrop.


Found this, but do not know how to get started in PB with that
https://metacpan.org/pod/Mediafire::Api ... :Api::File
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by infratec »

If you want to use the API you have to do what I have written one post before.

https://www.mediafire.com/developers/co ... g_started/
Last edited by infratec on Wed Jun 10, 2020 11:00 am, edited 1 time in total.
infratec
Always Here
Always Here
Posts: 6871
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by infratec »

I also told you alreday the other way:

Use from web instead of PC

https://mediafire.zendesk.com/hc/en-us/ ... MediaFire-

That's easy to handle by PB.
ZX80
Enthusiast
Enthusiast
Posts: 331
Joined: Mon Dec 12, 2016 1:37 pm

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by ZX80 »

StarWarsFan, some time ago I read a similar topic. I think infratec wanted to say this , when he told you about the session token. Only there another image hosting is used. See how it will help you. Here is the topic.
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by StarWarsFan »

ZX80 wrote:StarWarsFan, some time ago I read a similar topic. I think infratec wanted to say this , when he told you about the session token. Only there another image hosting is used. See how it will help you. Here is the topic.
That actually is a nice link. Thanks for sharing.
It is actually Module: Automatic image upload to ImgBB.com

I must look into that. My problem is that I am new to having PB Code communicate with webpages.
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
StarWarsFan
Enthusiast
Enthusiast
Posts: 169
Joined: Sat Mar 14, 2015 11:53 am

Re: How to UPLOAD a file to MEDIAFIRE.com using PB code?

Post by StarWarsFan »

Hm. Whatever I try in this matter, it does not work.

Has really nobody got a working code/module to upload a file into a Mediafire Filedrop?
(Try the link in post#1, NO LOGIN is needed to upload a file there, and that is what I want PureBasic code to do automated)
Image - There is usually a lot of "try this, maybe do that" but ONLY an example that one can test for themself and get an immediate result actually brings people forward.
Post Reply