This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from datetime import datetime, timedelta | |
import time | |
import requests | |
SLACK_URL = '<slack-hook-url-here>' | |
SLACK_ICON_URL = '<icon-url-for-message-here>' | |
SLACK_USERNAME = '<name-of-app-message-here>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parse.initialize(new Parse.Configuration.Builder(getApplicationContext()) | |
.applicationId("myAppId") | |
.server("http://192.168.1.108:1337/parse/") | |
.build() | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final ParseFile file = new ParseFile(f); | |
file.saveInBackground(new SaveCallback() { | |
public void done(ParseException e) { | |
// Handle success or failure here .. | |
if (e == null) { | |
Toast.makeText(getApplicationContext(), "File Uploaded", Toast.LENGTH_SHORT).show(); | |
Log.d("ishaan","uploadede url: "+file.getUrl()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02-12 12:58:19.263 7092-7092/com.ishaan.production.fileupload D/ishaan-parse: i/o failure | |
02-12 12:58:19.263 7092-7092/com.ishaan.production.fileupload W/System.err: com.parse.ParseRequest$ParseRequestException: i/o failure | |
02-12 12:58:19.273 7092-7092/com.ishaan.production.fileupload W/System.err: at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:290) | |
02-12 12:58:19.273 7092-7092/com.ishaan.production.fileupload W/System.err: at com.parse.ParseRequest$2.then(ParseRequest.java:145) | |
02-12 12:58:19.273 7092-7092/com.ishaan.production.fileupload W/System.err: at com.parse.ParseRequest$2.then(ParseRequest.java:139) | |
02-12 12:58:19.273 7092-7092/com.ishaan.production.fileupload W/System.err: at bolts.Task$15.run(Task.java:917) | |
02-12 12:58:19.273 7092-7092/com.ishaan.production.fileupload W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) | |
02-12 12:58:19.273 7092-7092/com.ishaan.production.fileupload W/System.err: at java.util.concu |
NewerOlder