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

Is it possible to get the images path? #36

Closed
Ziyad33 opened this issue Nov 1, 2017 · 3 comments
Closed

Is it possible to get the images path? #36

Ziyad33 opened this issue Nov 1, 2017 · 3 comments

Comments

@Ziyad33
Copy link

Ziyad33 commented Nov 1, 2017

I want to upload the images I get to the Firebase, and based on Firebase docs, I need to get the images location on the device.

How can I get the path of the selected images in var selectedAssets = [TLPHAsset]()?
I went through the methods of selectedAssets, i could find functions like selectedAssets.count and selectedAssets[0].originalFileName but nothing were related to the file path.

How can I get the files path in the device?

Any guidance will be appreciated

@tilltue
Copy link
Owner

tilltue commented Nov 2, 2017

@Ziyad33

Look at this. #22
Video assets issue. But It's same thing.

You have to copy temporary file. ( don't forget remove file after uploaded )

@Ziyad33
Copy link
Author

Ziyad33 commented Nov 2, 2017

in this line:
guard let localURL = writeURL,let mimetype = fileName.MIMEType() else { return nil }

it says that

value of type 'String' has no member 'MIMEType'

and in the last line here:
completion(url?.fileSize() ?? -1)
it says:

value of type 'URL' has no member 'fileSize'

@tilltue
Copy link
Owner

tilltue commented Nov 6, 2017

@Ziyad33
You have to implementation write to image temporary file. like This
#22 is in video case.

@tilltue tilltue closed this as completed Nov 13, 2017
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