Deleting files from outside filepicker (ink-file-picker) - filepicker.io

I have a job which goes through and removes un-used files that were originally uploaded via filepicker from my S3 account. Is that a problem? Does file picker sync with S3 and do any sort of cleanup process to remove unused urls automatically?

Ink does not automatically delete file URLs that can no longer resolve, so what will happen is that the "www.filepicker.io/api/file/" urls will 404

Related

Can google cloud storage auto delete unused image/file?

I use google cloud storage as my CKEditor image uploader.
But now I face some problems. If I upload a image to GCS, then I delete the image in my article, that image still exist in my GCS.
Can GCS auto delete unused image?
It sounds like the condition you want is that there are no img tag references in your HTML files to an image file you want to delete. If that's the case, Lifecycle Management has no condition support for that condition. Or maybe you're thinking of deleting images if they haven't been accessed in the past N days. Unfortunately that also is not a condition supported by Lifecycle Management.
If the above is a correct interpretation of your case, you will need to implement something to do the needed detection - either by walking your HTML objects and determining which of your image files is no longer referenced, or by enabling object access logging and walking the logs to determine image files that haven't been accessed recently.
You can set up a GCS Object Lifecycle rule that would delete images based on conditions you choose.

With filepicker.io, is there a way to get the original file path?

I am using filepicker.io and specially computer as main service.
I would like to get the original file path of a file uploaded through the API.
For example, if I upload a file located at /my/path/in/my/computer/file.zip, I will get in the FPFile object the filepicker.io URL but not the original file path.
Is there a way to get it ?
PS: I have tried to retrieve the stat of the file too without success.
Due to browser security limitations, the real local path of the file is never exposed to the javascript application. For more information, see http://davidwalsh.name/fakepath

How to use AWS iOS SDK to delete a folder and all its objects in side bucket?

I am uploading objects to amazon s3 using AWS iOS SDK in Iphone, sometime error occurs and some of the objects are uploaded, remaining are not uploaded. I have created bucket and inside bucket i have created folder in which i have store my objects. I want to delete folder and all its object. Can anyone help me?
First of all, there is not such thing as "folders" in S3. Most S3 clients (including the AWS web console) show them as folders only for convenience (grouping stuff), but in fact, what you see as a "folder name" is merely a prefix.
Being that said, my suggestion to you is using the listObjectsInBucket API call, passing in your "folder name" as prefix in the S3ListObjectsRequest parameter.
When you have obtained all the keys (file names including prefix) matching that prefix, use the deleteObjects API call, passing in the keys in S3ListObjectsRequest parameter.
For more details on folder/prefix and deleting stuff, please see these related links:
Delete files, directories and buckets in amazon s3 java
Thread on AWS forum regarding this subject

iCloud - Moving the file completed

I can able to move a file from the local directory to iCloud using the condition setUbiquitous:YES. The file has been moved successfully. If the file size is large, it takes certain time to complete moving. Is there any method to identify, if the file has completed moving to iCloud? Thanks in advance for your answers.
Note: I haven't done this myself, so all the info below is purely from reading the documentation:
The NSMetadataItem class has, among others, an attribute key called NSMetadataUbiquitousItemIsUploadedKey. Knowing this, you should be able to set up an NSMetadataQuery that notifies you once the item has been uploaded.
You can check with NSUURL getResourceValue:forKey:error: method
NSURLUbiquitousItemIsUploadedKey—Indicates that locally made changes were successfully uploaded to the iCloud server.
NSURLUbiquitousItemIsUploadingKey—Indicates that locally made changes are being uploaded to the iCloud server now.
NSURLUbiquitousItemPercentUploadedKey—For an item being uploaded, indicates what percentage of the changes have already been uploaded to the server.
For details: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1

Uploading files different servers at once using a single html Form

Is there a way to make a form where it can simultaneously upload to several servers at once?
Currently in my web application, I am asking the users to type in some info + select a few files to upload.
Title, Description, Info, etc
File 0
File 1
File 2
File ...
On the backend, I'm using Pylons. Currently it accepts POST of (info + all files), processes the info and the first file (file 0), and uploads them again to Amazon S3. I only need to process info and the 'file 0' on my own server, the rest of the files I can pass through directly to S3 via a POST.
Is there a way to make a form where the info+file0 will be POST'ed to one server, and the rest of the files be POST'ed directly to S3?
While you could employ JavaScript trickery to make clicking on a submit button result in multiple POST requests to multiple servers, such a solution will almost certainly cause more problems than it solves. You should probably stick with your current method.
Check this and this out.
My solution would involve ajax upload(s) to S3 as a first step. Once you're done with the files, you can submit all the other fields (not ajax) to your webserver, eventually adding the generated S3 links.