
Upload to BayFiles
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
A simple service to upload any file to BayFiles.com
To install this service menu:
1. as root:
cp bayfiles-upload.desktop /usr/share/kde4/services/ServiceMenus/
2. and as normal user:
kbuildsycoca4
Dependencies:
* curl
* awk
* grep
* tr
* xdg-open
* Perl and libjson-pp-perl(for json_pp)
9 years ago
0.2 Opens Links webpage instead of displaying a dialog with the link
0.1 First release
9 years ago
0.2 Opens Links webpage instead of displaying a dialog with the link
0.1 First release
masterdany88
9 years ago
* curl
curl is a client to get files from servers using any of the supported protocols. The command is designed to work without user interaction or any kind of interactivity.
curl offers a busload of useful tricks like proxy support, user authentication, ftp upload, HTTP post, file transfer resume and more.
Canonical dostarcza aktualizacje krytyczne dla curl do kwietnia 2013
WHICH IS INSTALLED
* awk
mamwk gawk and original-awk I've installed
* grep- installed
* tr??? what is it???
* xdg-open
xdg-utils and openbox-xdgmenu I've installed
* Perl(for json_pp) ??? what is it??? I have package perl in my repo and I have installed it.
PS. I am using Kubutnu 11.10
Report
masterdany88
9 years ago
Could you try this in a console, see if it works and tell me the results?
curl -s http://api.bayfiles.com/v1/file/uploadUrl | json_pp | grep uploadUrl | awk \'{print $3}\' | tr -d , | tr -d \\\\\"
[code]danielo@danielos:~/pobrane_Firefox$ curl -s http://api.bayfiles.com/v1/file/uploadUrl | json_pp | grep uploadUrl | awk \'{print $3}\' | tr -d , | tr -d \\\\\"
awk: '{print
awk: ^ nieprawidłowy znak ''' w wyrażeniu
[/code]
If you get an try:
curl -s http://api.bayfiles.com/v1/file/uploadUrl | json_pp
[code]danielo@danielos:~/pobrane_Firefox$ curl -s http://api.bayfiles.com/v1/file/uploadUrl | json_pp
{
"uploadUrl" : "http://s7.baycdn.com/upload/78e9a6f5/4f10c663/16/0?X-Progress-ID=4f0b482366CB6D2D7112F86C52C5859B66DF4286",
"progressUrl" : "http://s7.baycdn.com/progress/?X-Progress-ID=4f0b482366CB6D2D7112F86C52C5859B66DF4286",
"error" : ""
}
danielo@danielos:~/pobrane_Firefox$
[/code]
If you still get an error try just
curl -s http://api.bayfiles.com/v1/file/uploadUrl
[code]danielo@danielos:~/pobrane_Firefox$ curl -s http://api.bayfiles.com/v1/file/uploadUrl
{"error":"","uploadUrl":"http:\/\/s1.baycdn.com\/upload\/48c53848\/4f10c683\/0\/0?X-Progress-ID=4f0b4843AF286A0347489C55F4CA19273F73DEEE","progressUrl":"http:\/\/s1.baycdn.com\/progress\/?X-Progress-ID=4f0b4843AF286A0347489C55F4CA19273F73DEEE"} [/code]
If you get an error it means you don\'t have curl, otherwise you don\'t have json_pp
danielo@danielos:~/pobrane_Firefox$ sudo apt-get install libjson-pp-perl[sudo] password for danielo:
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
libjson-pp-perl jest już w najnowszej wersji.
0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 1 nieaktualizowanych.
danielo@danielos:~/pobrane_Firefox$
still the same error
Report
otzy007
9 years ago
http://bayfiles.com/file/1lmh/XzXMUm/bayfiles-upload.desktop
Report
masterdany88
9 years ago
Report
otzy007
9 years ago
Report
otzy007
9 years ago
On my fresh installed Kubuntu the service is working
Report
masterdany88
9 years ago
kbuildsycoca4 running...
kbuildsycoca4(6614) VFolderMenu::loadDoc: Parse error in "/home/danielo/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu" , line 1 , col 1 : "unexpected end of file"
kbuildsycoca4(6614)/kdecore (services) KServicePrivate::init: The desktop entry file "/usr/share/applications/kde4/koffice.desktop" has Type= "Application" but no Exec line
kbuildsycoca4(6614) KBuildServiceFactory::createEntry: Invalid Service : "/usr/share/applications/kde4/koffice.desktop"
kbuildsycoca4(6614) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
danielo@danielos:~/pobrane_Firefox/148065-bayfiles-upload$
RMB>Upload to BayFiles
Nie można znaleźć programu '-s' =>
It can find program '-s'
thanks in advance
Report
otzy007
9 years ago
And for the second error it's my fault. In order to use Upload to BayFiles you need to have installed:
* curl
* awk
* grep
* tr
* xdg-open
* Perl(for json_pp)
Report