I am using upload media through twitter API
https://upload.twitter.com/1.1/media/upload.json
it’s showing success when uploading image
{“media_id”:1126023933537292288,“media_id_string”:“1126023933537292288”,“size”:108365,“expires_after_secs”:86400,“image”:{“image_type”:“image/jpeg”,“w”:752,“h”:960}}
but
https://upload.twitter.com/1.1/media/upload.json?command=STATUS&media_id=1126023933537292288
giving me
{
“request”: “/1.1/media/upload.json”,
“error”: “Invalid mediaId.”
}
How to solve it?
If the upload didn't return an error message, it should be available to use. As answered here, the STATUS command is only necessary for video uploads.
You should only call STATUS command if FINALIZE response contains processing_info field
Related
I'm trying to upload a video using the API. I can successfully authenticate, upload and create a video and receive a video id. But when I query the processing status using https://api.dailymotion.com/video/{VideoId}?fields=status%2Ctitle%2Cpublishing_progress URL, it keeps returning "publishing_progress": 7 no matter how long I wait.
If I try to upload the same video using the website directly it will process it just fine.
I wonder if anyone else has encountered this issue and know how to solve it.
I think there is an issue with the source URL you associated to the video.
Have you correctly filled the URL field at the video creation (STEP 4.) with the URL returned by the API when you uploaded your video (on STEP 3.)?
If so, you would encourage you to contact our support with more details to dig further into possible issues
First, I used https://github.com/jeanpan/react-native-camera-roll-picker#readme to get an image from photo library, it returned a uri: ph://11A68DD6-A651-462D-BDAB-68FB853ED141/L0/001
Then, I used https://github.com/zsajjad/react-native-text-detector to get text from that image
It worked fine in android but it always returned false in iOS, and I found the following error in console log
NSURLConnection finished with error - code -1002
For more information, the image control can show that image correctly
Here is my source code : https://github.com/haison8x/react-native-test-ocr
Is there any problem with that URI or with application permission?
Due to the sandbox policy of Apple https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html, your app cannot read the photo in gallery directly, it will encounter the error: NSURLConnection finished with error - code -1002.
Here is my approach:
Use RNFS.copyAssetsFileIOS copy photo to temp file at your app documents
Use react-native-text-detector to analyze that temp file
The full example is pushed to https://github.com/haison8x/react-native-test-ocr
I am trying to upload a picture to a channel using the code in this link:
const formData = new FormData();
formData.append('file', $('#formInputFile')[0].files[0]);
// get desired channel (for example, with getChannelBySid promise)
chatClient.getChannelBySid(channelSid).then(function(channel) {
// send media with all FormData parsed atrtibutes
channel.sendMessage(formData);
});
File is uploaded and image is shared successfully, but i would like to show upload progress to the user. How can i do it?
Also, while displaying images, is there a way to get thumbnail of the image first so as to not download the entire image unless user wants to see it?
No examples of the upload progress code is provided in Github sample project.
Twilio developer evangelist here.
I'm afraid that it is currently not possible to get progress events with the JavaScript API. Also, there is no thumbnails of images available either, you can get the image URL using message.media.getContentUrl() and that only resolves the promise with a single URL and doesn't take options.
I am submitting static image from bundle but I am getting this error:
Here is my code Can anyone notice my problem?
I'm using the iOS API to upload wav files to SoundCloud. There's no problem with the upload, however, when I attempt to download the file on the SoundCloud website the file name is always "unknown". When I upload the same song from my computer the file name matches the title.
There's nothing in the API reference that indicates you can set the download file name, so I assume it's generated from the title. Is this correct? Is there any additional metadata that needs to be set to make this work?
Any insight would be appreciated. Thanks!
When downloading a sound file from the SoundCloud website, the filename the user sees is the one used by the original uploader when they uploaded the sound to SoundCloud.