English 中文(简体)
iphone 视频上传到队列
原标题:iphone video upload in queue

我需要录制视频并将其上传到服务器。 它们将被添加到队列中, 并逐个上传 。

My question is, when i record a video, where should i save it till it gets uploaded ?
Should i save it in Album ? or in private documents directory ?

影片上传后我也要删除

根据 ios 指南, 是否只要求将视频保存在专辑中? 如果在文件目录中保存更长的时间, 我的应用程序是否会被拒绝?

问题回答

如果它们不是用户创建的(或者如果你不希望它们参与iCloud之类的活动),那么就不要把它们放在APPHOME/文件中。

首选位置是 APPHOME/Library/Caches, 但该位置可以通过系统恢复( 可能在其他时间 -- 文件没有具体说明) 的 iOS 进行清理。 它不会定期发生, 所以它是第一个选项, 如果您可以在恢复等罕见情况下重新生成数据 。

所以,如果文件可以重新生成, 请将其保存在 APPHOME/ Library/ Caches 中。 如果不能, 那么将它们放置在其他地方 APPHOME/ Library 中 。

只要确保上传完成后删除它们。

您可以在 Documents 目录中/从该目录中保存/删除它们。 相反, 您可以从用户的相册中删除视频/ 照片。 “ 较长的期间” 没有问题 。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签