Skip to content

ParseFile should NOT extends ParseObject. #233

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

Merged

Conversation

yulingtianxia
Copy link
Contributor

ParseObject should be a table in database on parse server, but ParseFile can't be a table.
I had found implementation of PFFileObject in iOS/OSX SDK, it's NOT a subclass of 'PFObject'.
When ParseFile extends from ParseObject, it cause an infinite loop in save() method.

@phillwiggins phillwiggins merged commit 79d6a4a into parse-community:release/1.0.23 Aug 1, 2019
@phillwiggins
Copy link
Member

I think this sounds logical.

Great work!

@yulingtianxia yulingtianxia deleted the bugfix_parse_file branch August 1, 2019 08:14
@pastordee
Copy link
Contributor

pastordee commented Aug 24, 2019

ParseObject should be a table in database on parse server, but ParseFile can't be a table.
I had found implementation of PFFileObject in iOS/OSX SDK, it's NOT a subclass of 'PFObject'.
When ParseFile extends from ParseObject, it cause an infinite loop in save() method.

Sorry @phillwiggins but if parseFile doesn't extend ParseObject upload doesn't work
I tested it with 1.0.24 it only works when I extend ParseObject.

Without extending ParseObject
flutter: ╭-- Parse Response
Class: null This is wrong
Function: ParseApiRQ.upload
Status Code: 201
Reponse: OK

When you extend ParseObject
flutter: ╭-- Parse Response
Class: File This is Right
Function: ParseApiRQ.upload
Status Code: 201
Payload: {"__type":"File","name":"***.jpg","url":".jpg"}

Please check it out for me thanks.

@phillwiggins
Copy link
Member

phillwiggins commented Aug 24, 2019 via email

@pastordee
Copy link
Contributor

Yes

@phillwiggins
Copy link
Member

phillwiggins commented Aug 24, 2019 via email

@pastordee
Copy link
Contributor

flutter: ╭-- Parse Response
Class: ParseFile
Function: ParseApiRQ.upload
Status Code: 201
Payload: {"__type":"File","name":".jpg","url":"*.jpg"}

This works fine for me the image is saved and return the file.
Thanks for the great work.
PS whenever you are in ESSEX please let me know stay bless.

@phillwiggins
Copy link
Member

phillwiggins commented Aug 24, 2019 via email

@pastordee
Copy link
Contributor

please can you add this to the next released

parse_server_sdk.dart
import 'package:flutter_native_timezone/flutter_native_timezone.dart';

parse_installation.dart
//Timezone
final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone();
set(keyTimeZone, currentTimeZone);

@phillwiggins
Copy link
Member

phillwiggins commented Aug 24, 2019 via email

@phillwiggins
Copy link
Member

phillwiggins commented Aug 24, 2019 via email

@pastordee
Copy link
Contributor

Oh okay on the mobile it work fine, I've been using it since 1.0.21

fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
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

Successfully merging this pull request may close these issues.

3 participants