How to store images for mobile development - amazon-s3

I decided to use back4app for easily creating my backend and for having a built in hosting solution.
I'm quite a newbie with this tool so my question will seem "simple":
I was wondering how will I store the images of my mobile application. As far as I know they use AWS so I thought the service would provide like an interface to upload some images to a S3 bucket...
Should I create a personal bucket or does the service offer that kind of feature ?
The idea is to store then the absolute url of the image in my model. For example each Class has a cover field of type string.

you're right, Back4App use AWS.
Back4App prepared the Backend for you, for example, if you try to save a file direct at your Parse Dashboard, you will can access the image and you already have a absolute URL.You can configure the column with a type File, like below:
Add a column with the File type
After upload a file, you will can access click at the box :)
After that upload the file

Related

Can we use SDKs directly in Suitelet?

Implementing a requirement to store images in AWS bucket instead of NetSuite. Since the bucket is private, I have to upload and generate the URL in backend/suitelet.
I tried to include AWS SDK into Suitelet by defining, but that doesn't work.
I want to get to know whether can we use/include SDKs inside Suitelet?
How can I implement a solution for this without using any third party solutions?
How are permissions for the links managed? Can you make them publicly viewable? Remember unless the links you generate are timestamped anyone with the link can get to the image.
In terms of uploading the images check out https://github.com/DeepChannel/netsuite-savedsearch-s3
If you need to keep have each image have a magic link you could use a Heroku app or an AWS lambda. The app would check a hash based on link parameters and proxy the image if the hash is valid. If your images are supposed to be private to a customer this would be the way to go.
If you are using the images generally on a website then just make the bucket publicly readable and use the API to upload.

Can I use Autodesk viewing API to render local DWG (2D) files to my browser?

The main goal of my project is to read Autocad(DWG) drawings from my local server to output them in a web browser (Chrome).
I managed to do it with the View and Data API in JAVA from Autocad with buckets, Key, etc. but when it comes to read offline files with this sample code from https://github.com/Developer-Autodesk/view-and-data-offline-sample, the DWG format did not work.
Do you have suggestion or have a clue to use the offline API with DWG files?
The Autodesk View & Data API (developer.autodesk.com) allows you to display a DWG on your website using a zero-client (WebGL) viewer. You need to upload the DWG to the Autodesk server, translate it, and either then download the translation to store on your local server (as demonstrated on extract.autodesk.io) or keep it on the Autodesk server. You might consider downloading it to be advantageous because then you don't need to implement the OAuth code on your server.
Buckets on the Autodesk server can only be accessed using the accesstoken created from your API keys, so it is secure in that only someone with your accesstoken and who knows the URN can access your translated file. However, for the viewer on your client-page to access the file, you need to provide it with your accesstoken. This does mean that someone could separately access your translated file by grabbing the accesstoken and URN from your webpage. But if you're serving up the model on a public page, then you presumably don't care about that.
There is a 'list' API available, but this is white-listed (available on request), so getting your accesstoken and urn for one file doesn't automatically give access to your other files - unless someone can guess the other filenames (or iterate to find them).
If you use a non-permanent bucket, then your original (untranslated file) becomes unavailable when the bucket expires, or you can explicitly delete the untranslated file (using the delete API).
Files translated via the View & Data API are not accessible via A360. They are stored in a separate area. (But I wouldn't be at all surprised if an A360 file access API became available in the near future :-).
Finally, unless you want to interact with the displayed file via the viewer's JavaScript API, you may prefer just to upload your files to A360, share the translated model, and then iframe embed them in your webpage.

NSUserDefaults and adding UIImages to an application via the web

I have an app that uses chat stickers. I would like to add more stickers to the app over time without having to make the user download an update. I understand that I can store data in NSUserDefaults so was wondering if it's possible to get an app to download images from a server to the NSDefaults? Say via parse or a similar service? Is this kind of thing allowed in an app? I read something in the developer guidelines that placeholders could not be used. Any advice on this would be really appreciated. Thanks!
If you want to use parse the store all the images in a table in the parse file storage. Download the images using the Parse SDK. The downloaded images will be cached appropriately by the SDK so you won't need to handle the cache yourself.
You can read more about how to store files with Parse here: https://www.parse.com/docs/ios_guide#files/iOS
NSUserdefaults is not meant to store big files like images. It should only contain small amounts of data.
You will need to download the images and save them locally. To download the image to a file use NSURLDownload.

Meteor Amazon S3 image upload with thumbnails

I'm using Meteor and would like to create a form with an image upload field that saves the uploaded file to an Amazon S3 bucket in its original size as well as multiple thumbnails sizes defined (passed) via the code.
So far I'm using the lepozepo:s3 package which works great but doesn't seem to allow options for generating additional thumbnails.
Given I can upload the original files onto S3 I'm considering looking into a service on Amazon that can generate the desired thumbnails and then notify my Meteor app. But I'm not sure how to achieve that.
Can anyone point me in the right direction or share some insight into the best approach for this?
PS: I want to avoid using Filepicker.io is possible.
Seems I was following the wrong path. CollectionFS has everything I need and more. I now have this working with plenty of scope to do more later. This is one brilliant collection of packages with clear guides on respective Github pages.
Here are the packages I ended up usings:
cfs:standard-packages - base
cfs:gridfs - required for some reason, not sure why
cfs:graphicsmagick - thumbnailing/cropping
cfs:s3 - S3 upload
Code sample →
CollectionFS is now deprecated, but there are other options:
Only upload, without S3 integration*: https://github.com/tomitrescak/meteor-uploads
Use the jQuery-File-Upload (which is great), it generates thumbs, has size and format validation, etc. Using basically these two packages together:
https://atmospherejs.com/tomi/upload-jquery
https://atmospherejs.com/tomi/upload-server
You can use other package for S3 integration.
Like: https://github.com/peerlibrary/meteor-aws-sdk/
Upload + Integration with S3: https://github.com/Lepozepo/S3
Good, but if you need to generate thumbs for example you will need to integrate with other package or do it yourself. I not tested, but I got this suggestion: https://github.com/jamgold/cropuploader
Upload only, but with examples of how to generate thumbs or integrate with S3 / DropBox / GridFS /: https://github.com/VeliovGroup/Meteor-Files/
Rich documentation and does well which proposes: Upload images.
Use that adapt best to your needs.
look at blueimp's "jquery file upload" for client and image server resizing. On client you have a bit limited possibilities quality wise, on server you can use full power of imagemagick. Or look at my blog post on http://doctorllama.wordpress.com for file uploads for meteor in general.
cfs:gridfs - required for some reason, not sure why
Meteor using gridfs to store file chunks inside mongo database. In case of s3 it's for temporary storage.

Upload a Dropbox file to InkFilepicker

I'm trying to upload a file using the Dropbox API to Ink Filepicker, but I can't find any documentation on doing things like this.
It's done in the backend using Ruby rather than with the Javascript frontend because it needs to automatically upload new photos (Specifically inside the '/Camera_Uploads' folder) as they're added.
Has anyone had experience with doing something like that? One solution I saw was sharing the file, and then uploading them with the Filepicker REST API, but that seems like a bad way to approach this.
I think that your approach of sending a URL to File Picker is a good one, but I would suggest using a media link instead of a share link. Media links expire after four hours, so they're a good alternative to permanently sharing a file.
In Ruby, the method you want is DropboxClient.media.