Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on saving / storing videos to user documents. #98

Open
8secz-johndpope opened this issue Jul 26, 2021 · 2 comments
Open

Comments

@8secz-johndpope
Copy link
Contributor

8secz-johndpope commented Jul 26, 2021

background -
I've still got errors with files moving around - but I wonder why we would want to move the videos to the users' documents, as this will be backed up????!!! Of course, the videos can deleted on each run - but still - it's possible the videos will be uploaded / backed up.
This is not desirable.

Optional

  • some : Error Domain=NSCocoaErrorDomain Code=4 "“3d670aed625fd22d2bee581128a1477f.mp4” couldn’t be moved to “CachedVideos” because either the former doesn’t exist, or the folder containing the latter doesn’t exist." UserInfo={NSSourceFilePathErrorKey=/private/var/mobile/Containers/Data/Application/54D5E245-B9D6-424B-A5A8-B61B2FF3A53F/tmp/3d670aed625fd22d2bee581128a1477f.mp4, NSUserStringVariant=(
    Move
    ), NSDestinationFilePath=/var/mobile/Containers/Data/Application/54D5E245-B9D6-424B-A5A8-B61B2FF3A53F/Documents/Celestial/CachedVideos/3d670aed625fd22d2bee581128a1477f.mp4, NSFilePath=/private/var/mobile/Containers/Data/Application/54D5E245-B9D6-424B-A5A8-B61B2FF3A53F/tmp/3d670aed625fd22d2bee581128a1477f.mp4, NSUnderlyingError=0x282d30690 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

UPDATE - I definitely have the file - 3d670aed625fd22d2bee581128a1477f.mp4
not sure what's going wrong...

could it be a sandbox issue? isn't the tmp folder sufficient for housing this content?

downloaded file with local file name: 3d670aed625fd22d2bee581128a1477f exists in file system directory: file:///private/var/mobile/Containers/Data/Application/54D5E245-B9D6-424B-A5A8-B61B2FF3A53F/tmp/. Directory contents: ["httpsd21m91m763fb64.cloudfront.netvideos-540p4595f3a0-4c4d-11eb-b966-11af6d636bea-.mp4", "httpsd21m91m763fb64.cloudfront.netvideos-540pa1f55040-8a1f-11eb-8bc7-65134f4b7bab-.mp4", "3d670aed625fd22d2bee581128a1477f.mp4", "httpsd21m91m763fb64.cloudfront.netvideos-540p19f1efb0-8a1e-11eb-8bc7-65134f4b7bab-.mp4", "https:__d21m91m763fb64.cloudfront.net_videos-540p_d9379510-903f-11eb-9a88-f5ff80ee2719-.mp4", "https:__d21m91m763fb64.cloudfront.net_videos-540p_9edc1cd0-a9f1-11eb-b98a-69bcf457ca9a-.mp4", "httpsd21m91m763fb64.cloudfront.netvideos-540pfd292d70-89f1-11eb-bbdc-672a9fc57f81-.mp4", "ecc055b46ee87f987d14cb00a75a0d68.mp4", "httpsd21m91m763fb64.cloudfront.netvideos-540pe4b390e0-8560-11eb-822b-3bb0ffb6770c-.mp4", "stack-logs.3879.10a42c000.8secondz.g3", "28ed6

@johndpope
Copy link

johndpope commented Jul 27, 2021

Just want to store to /tmp/
Screen Shot 2021-07-27 at 1 57 53 pm

@johndpope
Copy link

    fileprivate var videosDirectoryURL: URL {
        //let videosDireectoryName = "CachedVideos"
        //return celestialDirectoryURL.appendingPathComponent(videosDireectoryName, isDirectory: true)
        return temporaryDirectoryURL
    }

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants