Upload to s3 from react-native CameraRoll - ios

Considering using react-native-uploader to upload from iOS CameraRoll to s3. My end goal is to allow users to select an image from CameraRoll and post it on an api-based chat (sendbird). Based on the documentation, for react-native-uploader, though, it doesn't seem like it returns the s3 url in the response. Does anyone know if there's a way to get this back in the response? Perhaps I be approaching another way entirely?
Part of the rationale for this approach is that it's similar to how it works when a file is uploaded on the web-based version of the chat. We use file-uploader, then we post the message to sendbird using the s3 version of the url. Appreciate the help.

Ended up using react-native-aws3 instead. It was very straight forward.

Related

Get an image from URL and upload it to Firebase Storage

Is it possible to write a function to get an image from a url such as https://website.com/images/myImage.jpg and then automatically upload it to a Firebase Storage bucket?
I am trying to do it with multiple images in one go but am struggling to get one to work at the moment. My best attempt so far has seen me having to download the images, save them in the Media Library and then send them all up to Firebase, which surely cannot be the most efficient way?
In a nutshell, I have 10 images with URL's like the above and, when the function is fired I need them all to upload to my storage bucket, without the need to save them to the users device library.
Does anyone have any ideas on the most efficient way to do this please?

Firebase : Upload image or file from dashboard

I'm trying to find a good alternative at Parse.
FireBase seems to be good, but I can't find how to upload image/file from the dashboard like in Parse ?
Can we upload image/file from the firebase dashboard like in Parse ?
No You Can Not because firebase doesn't provide such type of feature.
Edit:
Ah! My old accepted answer got unaccepted because I gave straight answer :) Well OP didn't ask about programming way of solution so I assumed not to provide one.
There are couple of approaches to handle images with firebase, I usually upload images to s3 bucket and store urls in firebase. Again there is choice to implement above approach i.e. do all on server-side, do all on client-side or do with mix of client-side and server-side. But It is better to do signaturing on server to keep thing secure.
Node-Cheat Available:
For complete code, get working node-cheat at github node-cheat aws, choose any folder and run node file_name.
While the above is an answer, it's does't provide a solution, so here's a bit more data.
Uploading/storing data in firebase is super simple and requires a minimal amount of code.
For images, encode the image as a string and store the string in firebase. Then to retrieve the image, retrieve the string and decode it.
You should be able to do both in about 12 lines of code (depending on platform).
There are several examples already published here, I like this one with Swift.
Swift2 retrieving images from Firebase
Hope that helps!
No, you cannot upload directly, but you could use some opensource project out there that will make a simple dashboard for you to upload it easily like this tutorial

Uploading pdf files stored in iphone to server in ios

I am making an iphone application which is pretty much like forum. People can ask question and upload a pdf/doc file along with the question. Is there a way to access the pdf/doc file in iphone when user clicks upload button and send the file to server?
I have implemented the feature for image for which I used UIImagePicker to pick the image and send it to the server with http request. But I am completely lost and have no idea how to handle pdf/doc files in same manner.
Any help/suggestion really appreciated. Thanks in advance.
If you want to upload PDF and Doc files, then you can integrate Dropbox and Google Drive in your app and then select the files ,as Apple does not have centralised storage. If you notice Apple also chooses the documents from Google Drive while composing a mail.
So implementing and integrating google drive and Dropbox would be a good option.
Here is the link for Dropbox https://www.dropbox.com/developers-v1/core/sdks/ios
Here is the link for Google Drive https://developers.google.com/drive/ios/quickstart
Implementing Google drive is a bit hard but dropbox is quite simple.
Wish it saves your time. All the best!
I think you are looking for a combination of two things (both have been discussed here before and I include the links below).
(1) store a PDF. There are many options but the best way is to allow coredata to save outside the persistent store. Then store the reference to the file in core date. See: Insert a PDF file into Core Data?
(2) send the file to the server. There are many options for this as well. The fastest is probably to use a wrapper library such as ASIHTTPRequest. See: File Upload to HTTP server in iphone programming

Creating a Rails Music Player App (something like Rdio)

i want to create a rails app that has a lot of mixtapes, which the user can listen to and download (like datpiff.com). All the mixtapes would be uploaded by me. Each mixtape would have their own page, with the title, artist name, cover, etc.
I'm having trouble getting the architecture of the app right. What's the best way to upload all the mixtapes. (I'm thinking something like Amazon S3).
Do I have to upload a zipped file with the entire mixtape, and each individual song, or just the zipped file.
How do i show the information of each song (title, length, etc)
Ofcourse the biggest problem is the streaming of the mixtape, and the download of the file.
Can anyone guide me as to whats the best way to create this app. (Is Rails the best way to do it?)
Thanks in advance.
You're on the right track with S3. Use paperclip in conjunction with it if you want to make some sort of GUI for you to upload stuff with.
For streaming check out jPlayer, which is a jQuery plugin.
Download's no biggie. Check out Rails' send file. For sending from a remote source like S3, look here.

Upload image and text data in iphone

Hi stackoverflow friends
I want to upload text along with image to the webserver. I saw so many examples for uploading images to webserver but nobody explains how to send text from a uitextField along with image.
All of them points this link
http://iphone.zcentric.com/2008/08/29/post-a-uiimage-to-the-web/
This link gives only how to upload images only. I want to send some text values along with this. Could you please send me some example code.
Any help is Appreciable
I recommend you try ASIHTTPRequest. It allows you to easily accomplish such a task. You can create a PHP file that will receive your data via POST - ASIHTTPRequest provides some easy to use methods for this.
See here.
you can Use Evernote API for this purpose

Resources